Skip to content

Commit

Permalink
Re-lint.
Browse files Browse the repository at this point in the history
  • Loading branch information
Don McCurdy authored and donmccurdy committed Apr 4, 2020
1 parent b290bf7 commit 92cebb3
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 47 deletions.
3 changes: 1 addition & 2 deletions src/dat/color/Color.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ Color.recalculateHSV = function(color) {
{
s: result.s,
v: result.v
}
);
});

if (!common.isNaN(result.h)) {
color.__state.h = result.h;
Expand Down
3 changes: 2 additions & 1 deletion src/dat/color/interpret.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ const INTERPRETATIONS = [
'0x' +
test[1].toString() + test[1].toString() +
test[2].toString() + test[2].toString() +
test[3].toString() + test[3].toString(), 0)
test[3].toString() + test[3].toString(), 0
)
};
},

Expand Down
6 changes: 3 additions & 3 deletions src/dat/controllers/ColorController.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ class ColorController extends Controller {

common.extend(this.__input.style, {
outline: 'none',
// width: '120px',
// width: '120px',
textAlign: 'center',
// padding: '4px',
// marginBottom: '6px',
// padding: '4px',
// marginBottom: '6px',
color: '#fff',
border: 0,
fontWeight: 'bold',
Expand Down
4 changes: 2 additions & 2 deletions src/dat/controllers/ControllerFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ControllerFactory = function(object, property) {
// has step?
if (common.isNumber(arguments[4])) {
return new NumberControllerSlider(object, property,
arguments[2], arguments[3], arguments[4]);
arguments[2], arguments[3], arguments[4]);
}

return new NumberControllerSlider(object, property, arguments[2], arguments[3]);
Expand All @@ -43,7 +43,7 @@ const ControllerFactory = function(object, property) {
// number box
if (common.isNumber(arguments[4])) { // has step
return new NumberControllerBox(object, property,
{ min: arguments[2], max: arguments[3], step: arguments[4] });
{ min: arguments[2], max: arguments[3], step: arguments[4] });
}
return new NumberControllerBox(object, property, { min: arguments[2], max: arguments[3] });
}
Expand Down
6 changes: 3 additions & 3 deletions src/dat/dom/CenteredDiv.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* http://www.apache.org/licenses/LICENSE-2.0
*/

import dom from '../dom/dom';
import dom from './dom';
import common from '../utils/common';

class CenteredDiv {
Expand Down Expand Up @@ -58,7 +58,7 @@ class CenteredDiv {

this.domElement.style.display = 'block';
this.domElement.style.opacity = 0;
// this.domElement.style.top = '52%';
// this.domElement.style.top = '52%';
this.domElement.style.webkitTransform = 'scale(1.1)';

this.layout();
Expand Down Expand Up @@ -90,7 +90,7 @@ class CenteredDiv {
dom.bind(this.domElement, 'oTransitionEnd', hide);

this.backgroundElement.style.opacity = 0;
// this.domElement.style.top = '48%';
// this.domElement.style.top = '48%';
this.domElement.style.opacity = 0;
this.domElement.style.webkitTransform = 'scale(1.1)';
}
Expand Down
68 changes: 34 additions & 34 deletions src/dat/dom/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,42 +113,42 @@ const dom = {
const evt = document.createEvent(className);
switch (className) {
case 'MouseEvents':
{
const clientX = params.x || params.clientX || 0;
const clientY = params.y || params.clientY || 0;
evt.initMouseEvent(eventType, params.bubbles || false,
params.cancelable || true, window, params.clickCount || 1,
0, // screen X
0, // screen Y
clientX, // client X
clientY, // client Y
false, false, false, false, 0, null);
break;
}
{
const clientX = params.x || params.clientX || 0;
const clientY = params.y || params.clientY || 0;
evt.initMouseEvent(eventType, params.bubbles || false,
params.cancelable || true, window, params.clickCount || 1,
0, // screen X
0, // screen Y
clientX, // client X
clientY, // client Y
false, false, false, false, 0, null);
break;
}
case 'KeyboardEvents':
{
const init = evt.initKeyboardEvent || evt.initKeyEvent; // webkit || moz
common.defaults(params, {
cancelable: true,
ctrlKey: false,
altKey: false,
shiftKey: false,
metaKey: false,
keyCode: undefined,
charCode: undefined
});
init(eventType, params.bubbles || false,
params.cancelable, window,
params.ctrlKey, params.altKey,
params.shiftKey, params.metaKey,
params.keyCode, params.charCode);
break;
}
{
const init = evt.initKeyboardEvent || evt.initKeyEvent; // webkit || moz
common.defaults(params, {
cancelable: true,
ctrlKey: false,
altKey: false,
shiftKey: false,
metaKey: false,
keyCode: undefined,
charCode: undefined
});
init(eventType, params.bubbles || false,
params.cancelable, window,
params.ctrlKey, params.altKey,
params.shiftKey, params.metaKey,
params.keyCode, params.charCode);
break;
}
default:
{
evt.initEvent(eventType, params.bubbles || false, params.cancelable || true);
break;
}
{
evt.initEvent(eventType, params.bubbles || false, params.cancelable || true);
break;
}
}
common.defaults(evt, aux);
elem.dispatchEvent(evt);
Expand Down
5 changes: 3 additions & 2 deletions src/dat/gui/GUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const GUI = function(pars) {
if (params.autoPlace && common.isUndefined(params.scrollable)) {
params.scrollable = true;
}
// params.scrollable = common.isUndefined(params.parent) && params.scrollable === true;
// params.scrollable = common.isUndefined(params.parent) && params.scrollable === true;

// Not part of params because I don't want people passing this in via
// constructor. Should be a 'remembered' value.
Expand Down Expand Up @@ -1024,7 +1024,8 @@ function augmentController(gui, li, controller) {
{
before: controller.__li.nextElementSibling,
factoryArgs: [controller.__min, controller.__max, controller.__step]
});
}
);

newController.name(oldName);
if (wasListening) newController.listen();
Expand Down

0 comments on commit 92cebb3

Please sign in to comment.