1.0.18 • Published 7 years ago

syg-clock v1.0.18

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

A simple plugin of clock,support dial mode and digital mode.

repertory

Demo

  • Install

NPM

$npm install syg-clock 

or

<script type="text/javascript" src="/dist/clock.js"></script>
  • API
keyvaluedescription
selector'.clock'the root node
type'dial'/'digital'mode type
renderType'css'/'canvas'render type
color'#fff'/'rgba(255,255,255,1)'the stroke color
bgColor'#fff'/'rgba(255,255,255,1)'the bgcolor
dial.hasTimeLabeltrue/falseset TimeLabel
dial.hasTimeLabeltrue/falseset broder
digitalobjectdigital config
digital.fontSize12fontsize of digital
const clock = new Clock({
    selector: '.clock',
    type: 'dial',
    renderType: 'css',
    color: '#fff',
    bgColor: 'rgba(0, 0, 0, .35)',
    dial: {
        hasTimeLabel: true,
        hasBorder: true,
    },
    digital: {
        fontSize: 12,
    },
}); 
  • warn

the dial css type force hide the timeLabel while the container's size less than 80px, if you want to show it change the condition in dial.js.

  • TODO List
  • canvas mode
  • timelabel mode
  • show week and month
  • performance optimization
  • drag mode

if you want to contribute code view build

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago