1.0.18 • Published 8 years ago

syg-clock v1.0.18

Weekly downloads
3
License
MIT
Repository
github
Last release
8 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

8 years ago

1.0.17

8 years ago

1.0.16

8 years ago

1.0.15

8 years ago

1.0.14

8 years ago

1.0.13

8 years ago

1.0.12

8 years ago

1.0.11

8 years ago

1.0.9

8 years ago

1.0.8

8 years ago

1.0.7

8 years ago

1.0.6

8 years ago

1.0.5

8 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago