mirror of
https://github.com/konvajs/konva.git
synced 2026-01-09 11:34:38 +08:00
image unit tests are now passing
This commit is contained in:
@@ -271,18 +271,15 @@
|
||||
* @returns {ImageObject}
|
||||
*/
|
||||
|
||||
Kinetic.Factory.addBoxGetterSetter(Kinetic.Image, 'crop');
|
||||
Kinetic.Factory.addGetterSetter(Kinetic.Image, 'crop');
|
||||
/**
|
||||
* set crop
|
||||
* @method
|
||||
* @name setCrop
|
||||
* @memberof Kinetic.Image.prototype
|
||||
* @param {Object|Array}
|
||||
* @param {Object} crop {x: x, y: y, width: width, height: height}
|
||||
* @example
|
||||
* // set crop x, y, width and height with an array<br>
|
||||
* image.setCrop([20, 20, 100, 100]);<br><br>
|
||||
*
|
||||
* // set crop x, y, width and height with an object<br>
|
||||
* // set crop x, y, width and height<br>
|
||||
* image.setCrop({<br>
|
||||
* x: 20,<br>
|
||||
* y: 20,<br>
|
||||
@@ -291,38 +288,6 @@
|
||||
* });
|
||||
*/
|
||||
|
||||
/**
|
||||
* set cropX
|
||||
* @method
|
||||
* @name setCropX
|
||||
* @memberof Kinetic.Image.prototype
|
||||
* @param {Number} x
|
||||
*/
|
||||
|
||||
/**
|
||||
* set cropY
|
||||
* @name setCropY
|
||||
* @method
|
||||
* @memberof Kinetic.Image.prototype
|
||||
* @param {Number} y
|
||||
*/
|
||||
|
||||
/**
|
||||
* set cropWidth
|
||||
* @name setCropWidth
|
||||
* @method
|
||||
* @memberof Kinetic.Image.prototype
|
||||
* @param {Number} width
|
||||
*/
|
||||
|
||||
/**
|
||||
* set cropHeight
|
||||
* @name setCropHeight
|
||||
* @method
|
||||
* @memberof Kinetic.Image.prototype
|
||||
* @param {Number} height
|
||||
*/
|
||||
|
||||
/**
|
||||
* get crop
|
||||
* @name getCrop
|
||||
@@ -331,6 +296,15 @@
|
||||
* @returns {Object}
|
||||
*/
|
||||
|
||||
Kinetic.Factory.addComponentGetterSetter(Kinetic.Image, 'crop', 'x', 0);
|
||||
/**
|
||||
* set crop x
|
||||
* @method
|
||||
* @name setCropX
|
||||
* @memberof Kinetic.Image.prototype
|
||||
* @param {Number} x
|
||||
*/
|
||||
|
||||
/**
|
||||
* get crop x
|
||||
* @name getCropX
|
||||
@@ -339,6 +313,15 @@
|
||||
* @returns {Number}
|
||||
*/
|
||||
|
||||
Kinetic.Factory.addComponentGetterSetter(Kinetic.Image, 'crop', 'y', 0);
|
||||
/**
|
||||
* set crop y
|
||||
* @name setCropY
|
||||
* @method
|
||||
* @memberof Kinetic.Image.prototype
|
||||
* @param {Number} y
|
||||
*/
|
||||
|
||||
/**
|
||||
* get crop y
|
||||
* @name getCropY
|
||||
@@ -347,6 +330,15 @@
|
||||
* @returns {Number}
|
||||
*/
|
||||
|
||||
Kinetic.Factory.addComponentGetterSetter(Kinetic.Image, 'crop', 'width', 0);
|
||||
/**
|
||||
* set cropWidth
|
||||
* @name setCropWidth
|
||||
* @method
|
||||
* @memberof Kinetic.Image.prototype
|
||||
* @param {Number} width
|
||||
*/
|
||||
|
||||
/**
|
||||
* get crop width
|
||||
* @name getCropWidth
|
||||
@@ -355,6 +347,15 @@
|
||||
* @returns {Number}
|
||||
*/
|
||||
|
||||
Kinetic.Factory.addComponentGetterSetter(Kinetic.Image, 'crop', 'height', 0);
|
||||
/**
|
||||
* set cropHeight
|
||||
* @name setCropHeight
|
||||
* @method
|
||||
* @memberof Kinetic.Image.prototype
|
||||
* @param {Number} height
|
||||
*/
|
||||
|
||||
/**
|
||||
* get crop height
|
||||
* @name getCropHeight
|
||||
|
||||
Reference in New Issue
Block a user