Dev environment : closure compiler + jshint update

Fixed error raised by closure compiler
Added es3 option to jshint (detect trailing commas)
Added curly option to jshint (missing curly braces for if/for blocks)
Removed trailing whitespaces (not enforced through jshint though)
This commit is contained in:
Julian Descottes
2013-09-28 23:52:51 +02:00
parent b254c582b9
commit ca427e0853
26 changed files with 136 additions and 129 deletions

View File

@ -1,6 +1,6 @@
(function () {
var ns = $.namespace("pskl.model");
ns.Frame = function (width, height) {
if (width && height) {
this.width = width;
@ -130,7 +130,7 @@
if (this.stateIndex < this.previousStates.length - 1) {
this.stateIndex++;
this.setPixels(this.previousStates[this.stateIndex]);
}
}
};
ns.Frame.prototype.isSameSize = function (otherFrame) {

View File

@ -52,7 +52,7 @@
return colors;
};
// Could be used to pass around model using long GET param (good enough for simple models) and
// Could be used to pass around model using long GET param (good enough for simple models) and
// do some temporary locastorage
ns.FrameSheet.prototype.serialize = function() {
var serializedFrames = [];
@ -73,7 +73,7 @@
this.load(JSON.parse(serialized));
} catch (e) {
throw "Could not load serialized framesheet : " + e.message;
}
}
};
@ -99,7 +99,7 @@
$.publish(Events.FRAMESHEET_RESET);
};
ns.FrameSheet.prototype.hasFrameAtIndex = function(index) {
return (index >= 0 && index < this.frames.length);
};
@ -107,7 +107,7 @@
ns.FrameSheet.prototype.getFrameByIndex = function(index) {
if (isNaN(index)) {
throw "Bad argument value for getFrameByIndex method: <" + index + ">";
}
}
if (!this.hasFrameAtIndex(index)) {
throw "Out of bound index for frameSheet object.";