mirror of
https://github.com/konvajs/konva.git
synced 2025-09-19 19:07:59 +08:00
cleaned up jshint errors in Image.js
This commit is contained in:
@@ -13,5 +13,8 @@
|
|||||||
"indent": 4,
|
"indent": 4,
|
||||||
"latedef": true,
|
"latedef": true,
|
||||||
"quotmark": "single",
|
"quotmark": "single",
|
||||||
"unused": true
|
"unused": true,
|
||||||
|
"globals": {
|
||||||
|
"Kinetic": false
|
||||||
|
}
|
||||||
}
|
}
|
@@ -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);
|
||||||
|
Reference in New Issue
Block a user