mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
hooked class attributeses properly on Number Controller and Slider
This commit is contained in:
parent
765ade71e9
commit
d3cc444cad
@ -85,6 +85,7 @@ GUI.NumberController = function() {
|
||||
numberField.focus();
|
||||
numberField.select();
|
||||
}
|
||||
if(slider) slider.domElement.className = slider.domElement.className.replace(' active', '');
|
||||
draggedNumberField = false;
|
||||
clickedNumberField = false;
|
||||
if (_this.finishChangeFunction != null) {
|
||||
@ -106,6 +107,8 @@ GUI.NumberController = function() {
|
||||
GUI.makeUnselectable(_this.parent.domElement);
|
||||
GUI.makeUnselectable(numberField);
|
||||
|
||||
if(slider) slider.domElement.className += ' active';
|
||||
|
||||
py = y;
|
||||
y = e.pageY;
|
||||
var dy = py - y;
|
||||
|
@ -46,6 +46,7 @@ GUI.Slider = function(numberController, min, max, step, initValue) {
|
||||
x = px = e.pageX;
|
||||
_this.domElement.setAttribute('class', 'guidat-slider-bg active');
|
||||
_this.fg.setAttribute('class', 'guidat-slider-fg active');
|
||||
numberController.domElement.className += ' active';
|
||||
onDrag(e);
|
||||
document.addEventListener('mouseup', mouseup, false);
|
||||
}, false);
|
||||
@ -54,6 +55,7 @@ GUI.Slider = function(numberController, min, max, step, initValue) {
|
||||
var mouseup = function(e) {
|
||||
_this.domElement.setAttribute('class', 'guidat-slider-bg');
|
||||
_this.fg.setAttribute('class', 'guidat-slider-fg');
|
||||
numberController.domElement.className = numberController.domElement.className.replace(' active', '');
|
||||
clicked = false;
|
||||
if (numberController.finishChangeFunction != null) {
|
||||
numberController.finishChangeFunction.call(this, numberController.getValue());
|
||||
|
Loading…
Reference in New Issue
Block a user