update style for jshint and jscs

This commit is contained in:
Doug Fritz 2014-09-03 21:14:36 -07:00
parent b536c15b1d
commit 49649b1ff9
9 changed files with 43 additions and 31 deletions

View File

@ -5,7 +5,7 @@
"camelcase": true,
"curly": true,
"immed": true,
"newcap": true,
"newcap": false,
"noarg": true,
"undef": true,
"unused": "vars",

View File

@ -1,4 +1,7 @@
/* globals document */
(function(scope) {
'use strict';
var Gui = function(params) {
@ -20,7 +23,6 @@
};
// Register custom controllers
// -------------------------------
@ -32,7 +34,6 @@
};
// Returns a controller based on a value
// -------------------------------
@ -52,7 +53,6 @@
};
// Gui ready handler ... * shakes fist at polymer *
// -------------------------------
@ -72,11 +72,14 @@
Gui.ready = function(fnc) {
ready ? fnc() : readyHandlers.push(fnc);
if (ready) {
fnc();
} else {
readyHandlers.push(fnc);
}
};
// Error
// -------------------------------
@ -92,7 +95,6 @@
console.warn.apply(console, args);
};
// Old namespaces
// -------------------------------
@ -129,13 +131,10 @@
}
// Export
// -------------------------------
scope.dat = dat;
scope.Gui = Gui;
})(this);

View File

@ -1,3 +1,6 @@
/* globals Gui, Polymer, PathObserver */
'use strict';
/*
[ ] onChange()
@ -17,7 +20,6 @@ Polymer('controller-base', {
init: function() {},
// Observers
// -------------------------------
@ -36,7 +38,6 @@ Polymer('controller-base', {
},
// Helpers
// -------------------------------
@ -44,7 +45,6 @@ Polymer('controller-base', {
return (x - a) / (b - a) * (d - c) + c;
},
// Legacy
// -------------------------------
@ -68,5 +68,4 @@ Polymer('controller-base', {
}
});

View File

@ -1,3 +1,6 @@
/* globals Gui, Polymer */
'use strict';
Gui.register('controller-boolean', function(value) {
return typeof value == 'boolean';
@ -8,7 +11,6 @@ Polymer('controller-boolean', {
ready: function() {
},
toggle: function() {

View File

@ -1,3 +1,6 @@
/* globals Gui, Polymer */
'use strict';
Gui.register('controller-function', function(value) {
return typeof value == 'function';

View File

@ -1,3 +1,6 @@
/* globals Gui, Polymer, window */
'use strict';
/*
[ ] arrow keys
@ -34,11 +37,15 @@ Polymer('controller-number', {
var _this = this;
window.addEventListener('keydown', function(e) {
if (e.keyCode == 18) _this._alt = true;
if (e.keyCode == 18) {
_this._alt = true;
}
}, false);
window.addEventListener('keyup', function(e) {
if (e.keyCode == 18) _this._alt = false;
if (e.keyCode == 18) {
_this._alt = false;
}
}, false);
this.super();
@ -140,7 +147,6 @@ Polymer('controller-number', {
},
// Events
// -------------------------------
@ -162,7 +168,7 @@ Polymer('controller-number', {
e.preventDefault();
this._rect = this.$.track.getBoundingClientRect();
if (!this._alt) this.value = this.valueFromX(e.x);
if (!this._alt) { this.value = this.valueFromX(e.x); }
},
@ -185,7 +191,7 @@ Polymer('controller-number', {
var dv = this.valueFromDX(e.ddx);
if (this._alt) dv /= 10;
if (this._alt) { dv /= 10; }
this.value += dv * this._dragFriction;
@ -213,8 +219,6 @@ Polymer('controller-number', {
},
// Filters
// -------------------------------
@ -228,7 +232,6 @@ Polymer('controller-number', {
},
// Helpers
// -------------------------------

View File

@ -1,3 +1,6 @@
/* globals Gui, Polymer */
'use strict';
Gui.register('controller-string', function(value) {
return typeof value == 'string';

View File

@ -1,3 +1,6 @@
/* globals Polymer, window, document, Path, Gui */
'use strict';
// [ ] scrolling when docked
// [ ] scrolling when window short and not docked
@ -6,7 +9,7 @@ Polymer('gui-panel', {
docked: false,
open: true,
touch: ('ontouchstart' in window) ||
(!!window.DocumentTouch && document instanceof DocumentTouch),
(!!window.DocumentTouch && document instanceof window.DocumentTouch),
ready: function() {
@ -17,14 +20,15 @@ Polymer('gui-panel', {
},
anon: function() {
var name;
if (arguments.length == 1) {
var name = arguments[0];
name = arguments[0];
return this.anon.values[name];
}
var initialValue = arguments[0];
var name = arguments[1];
name = arguments[1];
var args = [this.anon.values, name];
args = args.concat(Array.prototype.slice.call(arguments, 2));
@ -41,7 +45,7 @@ Polymer('gui-panel', {
var value = Path.get(path).getValueFrom(object);
if (value == null || value == undefined) {
if (value === null || value === undefined) {
return Gui.error(object +
' doesn\'t have a value for path "' + path + '".');
}
@ -79,7 +83,6 @@ Polymer('gui-panel', {
},
// Observers
// -------------------------------
@ -101,7 +104,6 @@ Polymer('gui-panel', {
}
},
dockedChanged: function() {
@ -110,7 +112,6 @@ Polymer('gui-panel', {
},
// Events
// -------------------------------
@ -128,7 +129,6 @@ Polymer('gui-panel', {
// },
// Legacy
// -------------------------------

View File

@ -1,3 +1,6 @@
/* globals Polymer */
'use strict';
Polymer('gui-row', {
comment: null,