mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
fix eslint issues
This commit is contained in:
parent
195ae9dcea
commit
3f6f66d09c
@ -75,7 +75,7 @@ const INTERPRETATIONS = [
|
|||||||
|
|
||||||
CSS_RGBA: {
|
CSS_RGBA: {
|
||||||
read: function(original) {
|
read: function(original) {
|
||||||
const test = original.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\,\s*(.+)\s*\)/);
|
const test = original.match(/^rgba\(\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*,\s*(.+)\s*\)/);
|
||||||
if (test === null) {
|
if (test === null) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,8 @@ const ControllerFactory = function(object, property) {
|
|||||||
if (common.isNumber(arguments[2]) && common.isNumber(arguments[3])) {
|
if (common.isNumber(arguments[2]) && common.isNumber(arguments[3])) {
|
||||||
// has step?
|
// has step?
|
||||||
if (common.isNumber(arguments[4])) {
|
if (common.isNumber(arguments[4])) {
|
||||||
return new NumberControllerSlider(object, property, arguments[2], arguments[3], arguments[4]);
|
return new NumberControllerSlider(object, property,
|
||||||
|
arguments[2], arguments[3], arguments[4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new NumberControllerSlider(object, property, arguments[2], arguments[3]);
|
return new NumberControllerSlider(object, property, arguments[2], arguments[3]);
|
||||||
@ -41,7 +42,8 @@ const ControllerFactory = function(object, property) {
|
|||||||
|
|
||||||
// number box
|
// number box
|
||||||
if (common.isNumber(arguments[4])) { // has step
|
if (common.isNumber(arguments[4])) { // has step
|
||||||
return new NumberControllerBox(object, property, { min: arguments[2], max: arguments[3], step: arguments[4] });
|
return new NumberControllerBox(object, property,
|
||||||
|
{ min: arguments[2], max: arguments[3], step: arguments[4] });
|
||||||
}
|
}
|
||||||
return new NumberControllerBox(object, property, { min: arguments[2], max: arguments[3] });
|
return new NumberControllerBox(object, property, { min: arguments[2], max: arguments[3] });
|
||||||
}
|
}
|
||||||
@ -57,6 +59,8 @@ const ControllerFactory = function(object, property) {
|
|||||||
if (common.isBoolean(initialValue)) {
|
if (common.isBoolean(initialValue)) {
|
||||||
return new BooleanController(object, property);
|
return new BooleanController(object, property);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default ControllerFactory;
|
export default ControllerFactory;
|
||||||
|
@ -114,5 +114,3 @@ class NumberControllerBox extends NumberController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default NumberControllerBox;
|
export default NumberControllerBox;
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
import common from '../utils/common';
|
import common from '../utils/common';
|
||||||
|
|
||||||
const EVENT_MAP = {
|
const EVENT_MAP = {
|
||||||
'HTMLEvents': ['change'],
|
HTMLEvents: ['change'],
|
||||||
'MouseEvents': ['click', 'mousemove', 'mousedown', 'mouseup', 'mouseover'],
|
MouseEvents: ['click', 'mousemove', 'mousedown', 'mouseup', 'mouseover'],
|
||||||
'KeyboardEvents': ['keydown']
|
KeyboardEvents: ['keydown']
|
||||||
};
|
};
|
||||||
|
|
||||||
const EVENT_MAP_INV = {};
|
const EVENT_MAP_INV = {};
|
||||||
|
@ -45,7 +45,7 @@ const SUPPORTS_LOCAL_STORAGE = (function() {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
})();
|
}());
|
||||||
|
|
||||||
let SAVE_DIALOGUE;
|
let SAVE_DIALOGUE;
|
||||||
|
|
||||||
@ -545,11 +545,9 @@ common.extend(
|
|||||||
newGuiParams.autoPlace = this.autoPlace;
|
newGuiParams.autoPlace = this.autoPlace;
|
||||||
|
|
||||||
// Do we have saved appearance data for this folder?
|
// Do we have saved appearance data for this folder?
|
||||||
|
|
||||||
if (this.load && // Anything loaded?
|
if (this.load && // Anything loaded?
|
||||||
this.load.folders && // Was my parent a dead-end?
|
this.load.folders && // Was my parent a dead-end?
|
||||||
this.load.folders[name]) { // Did daddy remember me?
|
this.load.folders[name]) { // Did daddy remember me?
|
||||||
|
|
||||||
// Start me closed if I was closed
|
// Start me closed if I was closed
|
||||||
newGuiParams.closed = this.load.folders[name].closed;
|
newGuiParams.closed = this.load.folders[name].closed;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user