How to use the nexusui.Number function in nexusui

To help you get started, we’ve selected a few nexusui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SonyCSLParis / NONOTO / record_audio.ts View on Github external
bpmSliderRecordElem.setAttribute('id', 'bpm-slider-record');
    metronome_container.appendChild(bpmSliderRecordElem);

    let bpmCounterRecordElem: HTMLElement = document.createElement('div');
    bpmCounterRecordElem.setAttribute('id', 'bpm-counter-record');
    bpmCounterRecordElem.style.pointerEvents = 'none';
    bpmCounterRecordElem.style.margin = 'auto';
    metronome_container.appendChild(bpmCounterRecordElem);

    let bpmSliderRecord = new Nexus.Slider('#bpm-slider-record', {
        'size':[150, 40],
        'min': 80,
        'max': 130,
        'step': 1
    });
    let bpmCounterRecord = new Nexus.Number('#bpm-counter-record', {
        'size': [50, 30],
        'min': 80,
        'max': 130,
        'step': 1
    });
    bpmCounterRecord.link(bpmSliderRecord);
    bpmSliderRecord.value = 110;

    let m = metronome({
        len: 200,
        angle: 20,
        paper: "metronome_container",
        audio: "https://github.com/wilson428/metronome/blob/master/tick.wav?raw=true"
    });
    m.shapes().outline.attr("fill", "#0962ba");
    m.shapes().arm.attr("stroke", "#EEE");