Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

mobile-ruler

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobile-ruler

可滑动刻度尺

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

canvas-ruler

TODO: description

Usage

import Ruler from 'mobile-ruler'
const ruler = new Ruler({
        canvasId: "ruler",
        width: document.getElementById("ruler").offsetWidth, //画布宽
        height: 50, //画布高
        min: 0, //最小值
        max: 10000, //最大值
        scale: 100, //每个刻度代表值
        value: 0, //当前值
        unit: 10, //刻度距离
        lineColor: "#f00", //线颜色
        callback: function (val) {
          //刻度值改变时回调
          document.querySelector(".value").innerHTML = val;
        },
      });

Keywords

滑动

FAQs

Package last updated on 19 Oct 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts