mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
cleaning up
This commit is contained in:
parent
88f37adea8
commit
fe1597a19b
@ -3,6 +3,16 @@ GUI.Slider = function(numberController, min, max, step, initValue) {
|
|||||||
var clicked = false;
|
var clicked = false;
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
|
var x, px;
|
||||||
|
|
||||||
|
this.domElement = document.createElement('div');
|
||||||
|
this.domElement.setAttribute('class', 'guidat-slider-bg');
|
||||||
|
|
||||||
|
this.fg = document.createElement('div');
|
||||||
|
this.fg.setAttribute('class', 'guidat-slider-fg');
|
||||||
|
|
||||||
|
this.domElement.appendChild(this.fg);
|
||||||
|
|
||||||
var onDrag = function(e) {
|
var onDrag = function(e) {
|
||||||
if (!clicked) return;
|
if (!clicked) return;
|
||||||
var pos = findPos(_this.domElement);
|
var pos = findPos(_this.domElement);
|
||||||
@ -32,16 +42,6 @@ GUI.Slider = function(numberController, min, max, step, initValue) {
|
|||||||
document.removeEventListener('mouseup', mouseup, false);
|
document.removeEventListener('mouseup', mouseup, false);
|
||||||
};
|
};
|
||||||
|
|
||||||
var x, px;
|
|
||||||
|
|
||||||
this.domElement = document.createElement('div');
|
|
||||||
this.domElement.setAttribute('class', 'guidat-slider-bg');
|
|
||||||
|
|
||||||
this.fg = document.createElement('div');
|
|
||||||
this.fg.setAttribute('class', 'guidat-slider-fg');
|
|
||||||
|
|
||||||
this.domElement.appendChild(this.fg);
|
|
||||||
|
|
||||||
var findPos = function(obj) {
|
var findPos = function(obj) {
|
||||||
var curleft = 0, curtop = 0;
|
var curleft = 0, curtop = 0;
|
||||||
if (obj.offsetParent) {
|
if (obj.offsetParent) {
|
||||||
|
Loading…
Reference in New Issue
Block a user