Giter Site home page Giter Site logo

scale's Introduction

#移动端Scale刻度尺JavaScript源生canvas渲染插件

在线演示地址:http://www.0317news.cn/git/Scale/

author: Mr Cui(QQ:764028466)

suxingo目录是我的一个demo,着急赶工没有完善js,请以index.html为准,仅供参考,请各位轻拍共勉。

/** 刻度尺插件配置 conf={

    container : box容器id,            //(必填)

    width : 画布宽度,                 //(必填)

    height: 画布高度,                 //(必填)

    start : 刻度开始值,               //(必填)

    end :   刻度结束值,               //(必填)

    def :   中心线位置,               //(可选)

    unit :  刻度间隔,                 //(可选)

    background : 背景色,              //(可选)

    linecolor : 中心线颜色,           //(可选)

    scaleplate :{                     //刻度样式(可选)

        color : 刻度颜色,             //(可选)

        width : 刻度宽度,             //(可选)

        fontsize: 刻度值字体大小,     //(可选)

        fontcolor: 刻度值字体颜色,    //(可选)
        
        fontfamily: 刻度值字体        //(可选)
    }
}

*/

scale's People

Contributors

cuishuai611 avatar

Stargazers

lins avatar  avatar  avatar He Jia avatar flyJack avatar time avatar xiaohai avatar

scale's Issues

有bug

初始化定义的时候,应该是
var defX = Math.floor(c.width/2)-((c.def-c.start)/capacity*c.unit+space);
除以capacity 而不是乘号。另外判断刻度长度的时候,应该%space == 0 ;
不然数值变大就不对了...........

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.