added slider but still needs styling

This commit is contained in:
jonobr1 2011-01-24 14:08:02 -08:00
commit a039298731
3 changed files with 13 additions and 7 deletions

View File

@ -12,6 +12,13 @@ var Controller = function() {
return this.object[this.propertyName]; 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 = document.createElement('div');
this.domElement.setAttribute('class', 'guidat-controller ' + this.type); this.domElement.setAttribute('class', 'guidat-controller ' + this.type);
@ -23,12 +30,6 @@ var Controller = function() {
this.setName(this.propertyName); this.setName(this.propertyName);
this.domElement.appendChild(this.propertyNameElement); 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";
}
}; };

View File

@ -80,7 +80,11 @@ var NumberController = function() {
} else if(isDragged) { } else if(isDragged) {
if(inc != slider.value) inc = slider.value; if(inc != slider.value) inc = slider.value;
} }
<<<<<<< HEAD
updateValue(inc); updateValue(inc);
=======
return false;
>>>>>>> b8323ce896a851bbe5a18e17bff36a5bdaa97db1
}, false); }, false);
function updateValue(val) { function updateValue(val) {

View File

@ -78,6 +78,7 @@
} }
.guidat-controller.number input[type=number] { .guidat-controller.number input[type=number] {
width: 45px; width: 45px;
cursor: ns-resize;
} }
.guidat-controller.boolean input { .guidat-controller.boolean input {