made some browser depended changes

This commit is contained in:
jonobr1 2011-01-24 22:51:06 -08:00
parent 88eb51e7d5
commit f814a59131
2 changed files with 12 additions and 14 deletions

0
FETCH_HEAD Normal file
View File

View File

@ -26,7 +26,8 @@ var NumberController = function() {
var slider;
if (min && max) {
if (min && max &&
(navigator.appVersion.indexOf("chrome") != -1 || navigator.appVersion.indexOf("Safari") != -1)) {
slider = document.createElement('input');
slider.setAttribute('type', 'range');
@ -62,20 +63,17 @@ var NumberController = function() {
document.addEventListener('mousemove', dragNumberField, false);
}, false);
numberField.addEventListener('mouseup', function(e) {
updateValue(this.value);
}, false);
document.addEventListener('mouseup', function(e) {
document.removeEventListener('mousemove', dragNumberField, false);
_this.makeSelectable(GUI.domElement);
_this.makeSelectable(numberField);
}, false);
if(navigator.appVersion.indexOf('chrome') != -1) {
document.addEventListener('mouseout', function(e) {
document.removeEventListener('mousemove', dragNumberField, false);
}, false);
}
var dragNumberField = function(e) {
e.preventDefault();