mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
Added customized className for rows
This commit is contained in:
parent
096993eb6e
commit
7d8ec1a98f
@ -186,7 +186,7 @@ var Common = {
|
||||
return obj === false || obj === true;
|
||||
},
|
||||
isFunction: function isFunction(obj) {
|
||||
return Object.prototype.toString.call(obj) === '[object Function]';
|
||||
return obj instanceof Function;
|
||||
}
|
||||
};
|
||||
|
||||
@ -684,8 +684,9 @@ Object.defineProperty(Color.prototype, 'a', {
|
||||
});
|
||||
Object.defineProperty(Color.prototype, 'hex', {
|
||||
get: function get$$1() {
|
||||
if (!this.__state.space !== 'HEX') {
|
||||
if (this.__state.space !== 'HEX') {
|
||||
this.__state.hex = ColorMath.rgb_to_hex(this.r, this.g, this.b);
|
||||
this.__state.space = 'HEX';
|
||||
}
|
||||
return this.__state.hex;
|
||||
},
|
||||
@ -2322,6 +2323,9 @@ function _add(gui, object, property, params) {
|
||||
container.appendChild(controller.domElement);
|
||||
var li = addRow(gui, container, params.before);
|
||||
dom.addClass(li, GUI.CLASS_CONTROLLER_ROW);
|
||||
if (object.className) {
|
||||
dom.addClass(li, object.className);
|
||||
}
|
||||
if (controller instanceof ColorController) {
|
||||
dom.addClass(li, 'color');
|
||||
} else {
|
||||
|
File diff suppressed because one or more lines are too long
2
build/dat.gui.min.js
vendored
2
build/dat.gui.min.js
vendored
File diff suppressed because one or more lines are too long
@ -180,7 +180,7 @@ var Common = {
|
||||
return obj === false || obj === true;
|
||||
},
|
||||
isFunction: function isFunction(obj) {
|
||||
return Object.prototype.toString.call(obj) === '[object Function]';
|
||||
return obj instanceof Function;
|
||||
}
|
||||
};
|
||||
|
||||
@ -678,8 +678,9 @@ Object.defineProperty(Color.prototype, 'a', {
|
||||
});
|
||||
Object.defineProperty(Color.prototype, 'hex', {
|
||||
get: function get$$1() {
|
||||
if (!this.__state.space !== 'HEX') {
|
||||
if (this.__state.space !== 'HEX') {
|
||||
this.__state.hex = ColorMath.rgb_to_hex(this.r, this.g, this.b);
|
||||
this.__state.space = 'HEX';
|
||||
}
|
||||
return this.__state.hex;
|
||||
},
|
||||
@ -2316,6 +2317,9 @@ function _add(gui, object, property, params) {
|
||||
container.appendChild(controller.domElement);
|
||||
var li = addRow(gui, container, params.before);
|
||||
dom.addClass(li, GUI.CLASS_CONTROLLER_ROW);
|
||||
if (object.className) {
|
||||
dom.addClass(li, object.className);
|
||||
}
|
||||
if (controller instanceof ColorController) {
|
||||
dom.addClass(li, 'color');
|
||||
} else {
|
||||
|
File diff suppressed because one or more lines are too long
4
package-lock.json
generated
4
package-lock.json
generated
@ -77,6 +77,7 @@
|
||||
"resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz",
|
||||
"integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"kind-of": "^3.0.2",
|
||||
"longest": "^1.0.1",
|
||||
@ -3496,7 +3497,8 @@
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz",
|
||||
"integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=",
|
||||
"dev": true
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"loose-envify": {
|
||||
"version": "1.3.1",
|
||||
|
@ -1163,6 +1163,11 @@ function add(gui, object, property, params) {
|
||||
const li = addRow(gui, container, params.before);
|
||||
|
||||
dom.addClass(li, GUI.CLASS_CONTROLLER_ROW);
|
||||
|
||||
if (object.className) {
|
||||
dom.addClass(li, object.className);
|
||||
}
|
||||
|
||||
if (controller instanceof ColorController) {
|
||||
dom.addClass(li, 'color');
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user