Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A Rotary Dial menu for input numbers

License

NotificationsYou must be signed in to change notification settings

victorqribeiro/dial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ARotary Dial for input numbers.

RotaryDial

Live versionhere | Alternative linkhere

How to use it

Click / Touch the disc and drag it until the arrow. When the number reaches the arrow, it will turn red, then let go and that's your number.

How to use it on your web app

Include the RotaryDial.js file.

<scriptsrc="RotaryDial.js"></script>

Then create a new RotaryDial

constrd=newRotaryDial();

Creating a callback is easy, just define what your function will do with the number it receives from the RotaryDial.

constfunc=function(number){alert(number)}constrd=newRotaryDial({callback:func});

By default the RotaryDial has the console.log function as the callback.

Documentation

The RotaryDial accepts a configuration object on its constructor. The most import parts are the size and the callback. The size will determine the size of your rotary dial menu, and the callback determines which function will be called when a number is selected. Besides that, there are some color configurations you can fiddle with.

size - The size of the menu.Default 400px

callback - The function that will be called when a number is selected.Default console.log

discFillColor - The disc color.

discStrokeColor - The disc border color.

circlesFillColor - The circles (where the numbers are displayed) color.

circlesStrokeColor - The circles (where the numbers are displayed) border color.

circlesHighlightColor - The color that a circle will be displayed when a number is selected.

textFillColor - The text color.

textStrokeColor - The text border color.

arrowFillColor - The arrow color.

arrowStrokeColor - The arrow border color.

Releases

No releases published

Sponsor this project

    Packages

    No packages published

    [8]ページ先頭

    ©2009-2025 Movatter.jp