Coder Social home page Coder Social logo

crossfields-stop-watch's Introduction

<crossfields-stop-watch>

Polymer 1.0 stopwatch element to display duration.

Install the Polymer-CLI

First, make sure you have the Polymer CLI installed. Then run polymer serve to serve your application locally.

Viewing Your Application

$ polymer serve

Building Your Application

$ polymer build

This will create a build/ folder with bundled/ and unbundled/ sub-folders containing a bundled (Vulcanized) and unbundled builds, both run through HTML, CSS, and JS optimizers.

You can serve the built versions by giving polymer serve a folder to serve from:

$ polymer serve build/bundled

Running Tests

$ polymer test

Your application is already set up to be tested via web-component-tester. Run polymer test to run your application's test suite locally.

Element implementation

<crossfields-stop-watch></crossfields-stop-watch>

Properties

autoStart

Property Type Default
autoStart Boolean false

autostart the stop watch on load.

<crossfields-stop-watch auto-start="true"></crossfields-stop-watch>

hideMilliseconds

Property Type Default
hideMilliseconds Boolean true

hide milliseconds on the stop watch.

<crossfields-stop-watch hide-milliseconds="false"></crossfields-stop-watch>

mode

Property Type Default
mode String stopwatch

set the mode for the stopwatch.

  1. stopwatch
  2. increments the clock forwards.
  3. timer
  4. increments the stopwatch backwards from an offset millisecond time.
<crossfields-stop-watch mode="timer" offset="5000"></crossfields-stop-watch>
<crossfields-stop-watch mode="stopwatch"></crossfields-stop-watch>

offset

Property Type Default
offset Number 0

offset the clock by now time (calculated by milliseconds (1000 = 1 second)).

<crossfields-stop-watch offset="5000"></crossfields-stop-watch>

showActions

Property Type Default
showActions Boolean false

display the start, stop and rest buttons.

<crossfields-stop-watch show-actions="true"></crossfields-stop-watch>

showPause

Property Type Default
showPause Boolean false

show the pause and resume button next to the stopwatch.

<crossfields-stop-watch show-pause="true"></crossfields-stop-watch>

crossfields-stop-watch's People

Contributors

nathan-collins avatar

Watchers

James Cloos avatar

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.