cleaned up jshint errors in Image.js

This commit is contained in:
Eric Rowell
2013-11-27 10:22:24 -08:00
parent 1dec988c27
commit bc11554452
2 changed files with 6 additions and 9 deletions

View File

@@ -13,5 +13,8 @@
"indent": 4, "indent": 4,
"latedef": true, "latedef": true,
"quotmark": "single", "quotmark": "single",
"unused": true "unused": true,
"globals": {
"Kinetic": false
}
} }

View File

@@ -2,7 +2,6 @@
// CONSTANTS // CONSTANTS
var IMAGE = 'Image', var IMAGE = 'Image',
CROP = 'crop',
SET = 'set'; SET = 'set';
/** /**
@@ -34,8 +33,6 @@
Kinetic.Image.prototype = { Kinetic.Image.prototype = {
___init: function(config) { ___init: function(config) {
var that = this;
// call super constructor // call super constructor
Kinetic.Shape.call(this, config); Kinetic.Shape.call(this, config);
this.className = IMAGE; this.className = IMAGE;
@@ -46,7 +43,6 @@
drawFunc: function(context) { drawFunc: function(context) {
var width = this.getWidth(), var width = this.getWidth(),
height = this.getHeight(), height = this.getHeight(),
that = this,
crop, crop,
params, params,
image; image;
@@ -112,7 +108,6 @@
}, },
applyFilter: function() { applyFilter: function() {
var image = this.getImage(), var image = this.getImage(),
that = this,
width = this.getWidth(), width = this.getWidth(),
height = this.getHeight(), height = this.getHeight(),
filter = this.getFilter(), filter = this.getFilter(),
@@ -249,8 +244,7 @@
}; };
Kinetic.Factory.addFilterSetter = function(constructor, attr) { Kinetic.Factory.addFilterSetter = function(constructor, attr) {
var that = this, var method = SET + Kinetic.Util._capitalize(attr);
method = SET + Kinetic.Util._capitalize(attr);
constructor.prototype[method] = function(val) { constructor.prototype[method] = function(val) {
this._setAttr(attr, val); this._setAttr(attr, val);