MCPcopy
hub / github.com/dli/paint / onChange

Function onChange

slider.js:54–62  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

52 };
53
54 var onChange = function (event) {
55 var mouseX = Utilities.getMousePosition(event, div).x;
56
57 value = Utilities.clamp((mouseX / length) * (maxValue - minValue) + minValue, minValue, maxValue);
58
59 changeCallback(value);
60
61 redraw();
62 };
63
64 var mousePressed = false;
65

Callers 1

SliderFunction · 0.85

Calls 1

redrawFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…