mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Trying to make unselectable
This commit is contained in:
parent
58447b25c1
commit
b8323ce896
@ -12,6 +12,13 @@ var Controller = function() {
|
||||
return this.object[this.propertyName];
|
||||
}
|
||||
|
||||
this.makeUnselectable = function(elem) {
|
||||
elem.onselectstart = function() { return false; };
|
||||
elem.style.MozUserSelect = "none";
|
||||
elem.style.KhtmlUserSelect = "none";
|
||||
elem.unselectable = "on";
|
||||
}
|
||||
|
||||
this.domElement = document.createElement('div');
|
||||
this.domElement.setAttribute('class', 'guidat-controller ' + this.type);
|
||||
|
||||
@ -23,12 +30,6 @@ var Controller = function() {
|
||||
this.setName(this.propertyName);
|
||||
this.domElement.appendChild(this.propertyNameElement);
|
||||
|
||||
makeUnselectable(this.domElement);
|
||||
this.makeUnselectable(this.domElement);
|
||||
|
||||
function makeUnselectable(elem) {
|
||||
elem.onselectstart = function() { return false; };
|
||||
elem.style.MozUserSelect = "none";
|
||||
elem.style.KhtmlUserSelect = "none";
|
||||
elem.unselectable = "on";
|
||||
}
|
||||
};
|
@ -65,6 +65,7 @@ var NumberController = function() {
|
||||
button.value = inc;
|
||||
_this.setValue(inc);
|
||||
}
|
||||
return false;
|
||||
}, false);
|
||||
|
||||
this.__defineSetter__("position", function(val) {
|
||||
|
Loading…
Reference in New Issue
Block a user