npm

Need private packages and team management tools?Check out npm Orgs. »

digital-display

1.0.0 • Public • Published

digital-display Build Status

yarn version NuGet version

Javascript library to draw 7-segment displays

digital-display demo 1

This example in plunker: demo/index.html

Quick start

1 Download and Install digital-display

2 Include dependences

2.1 digital-display.js and digital-display.min.js are under dist folder.

2.2 Include digital-display.js or digital-display.min.js, e.g.

<head>
    ...
    <link rel="stylesheet" href="../dist/digital-display.css">
    <script src="../dist/digital-display.js"></script>
</head>

3 Use it

Just use it inside your javascript code this way:

<script>
 
    var dd1 = new DigitalDisplay("00:00:00", {
        el: null,
        x: 0,
        y: 0
    });
 
    dd1.displayText("88:88 88");
 
    var w = dd1.getWidth();
    var h = dd1.getHeight();
 
    var dd2 = new DigitalDisplay("00:00", {
        el: null,
        x: 20,
        y: 200,
        baseUnit: 5
    });
 
    var dd3 = new DigitalDisplay("abcdef", {
        el: null,
        x: 20,
        y: 400,
        baseUnit: 5
    });
 
    var dd4 = new DigitalDisplay("00:00:00", {
        el: "greenBox",
        x: 10,
        y: 10,
        class: "mio",
        width: 100
    })
    
<script>

4 License

digital-display.js is MIT licensed.

install

npm i digital-display

Downloadsweekly downloads

4

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability