mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
made some browser depended changes
This commit is contained in:
parent
88eb51e7d5
commit
f814a59131
0
FETCH_HEAD
Normal file
0
FETCH_HEAD
Normal file
@ -26,7 +26,8 @@ var NumberController = function() {
|
|||||||
|
|
||||||
var slider;
|
var slider;
|
||||||
|
|
||||||
if (min && max) {
|
if (min && max &&
|
||||||
|
(navigator.appVersion.indexOf("chrome") != -1 || navigator.appVersion.indexOf("Safari") != -1)) {
|
||||||
|
|
||||||
slider = document.createElement('input');
|
slider = document.createElement('input');
|
||||||
slider.setAttribute('type', 'range');
|
slider.setAttribute('type', 'range');
|
||||||
@ -62,20 +63,17 @@ var NumberController = function() {
|
|||||||
document.addEventListener('mousemove', dragNumberField, false);
|
document.addEventListener('mousemove', dragNumberField, false);
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
|
|
||||||
numberField.addEventListener('mouseup', function(e) {
|
|
||||||
updateValue(this.value);
|
|
||||||
}, false);
|
|
||||||
|
|
||||||
document.addEventListener('mouseup', function(e) {
|
document.addEventListener('mouseup', function(e) {
|
||||||
document.removeEventListener('mousemove', dragNumberField, false);
|
document.removeEventListener('mousemove', dragNumberField, false);
|
||||||
_this.makeSelectable(GUI.domElement);
|
_this.makeSelectable(GUI.domElement);
|
||||||
_this.makeSelectable(numberField);
|
_this.makeSelectable(numberField);
|
||||||
}, false);
|
}, false);
|
||||||
|
|
||||||
|
if(navigator.appVersion.indexOf('chrome') != -1) {
|
||||||
document.addEventListener('mouseout', function(e) {
|
document.addEventListener('mouseout', function(e) {
|
||||||
document.removeEventListener('mousemove', dragNumberField, false);
|
document.removeEventListener('mousemove', dragNumberField, false);
|
||||||
}, false);
|
}, false);
|
||||||
|
}
|
||||||
|
|
||||||
var dragNumberField = function(e) {
|
var dragNumberField = function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user