{
e.stopEvent();
- if(
- (
- this.rotate == 0 ||
- this.rotate == 180
- )
- &&
- (
- this.image.getHeight() < this.thumb.getWidth() ||
- this.image.getWidth() < this.thumb.getHeight()
- )
- ){
- return;
- }
-
- if(
- (
- this.rotate == 90 ||
- this.rotate == 270
- )
- &&
- (
- this.image.getWidth() < this.thumb.getWidth() ||
- this.image.getHeight() < this.thumb.getHeight()
- )
- ){
- return;
+ if(this.canRotate()){
+ this.rotate = (this.rotate > 180) ? 0 : this.rotate + 90;
+
+ this.imageCanvas.setStyle({
+ '-ms-transform' : 'rotate(' + this.rotate + 'deg)',
+ '-webkit-transform' : 'rotate(' + this.rotate + 'deg)',
+ 'transform' : 'rotate(' + this.rotate + 'deg)'
+ });
+
+ this.setCanvasPosition();
}
- this.rotate = (this.rotate > 180) ? 0 : this.rotate + 90;
-
- this.imageCanvas.setStyle({
- '-ms-transform' : 'rotate(' + this.rotate + 'deg)',
- '-webkit-transform' : 'rotate(' + this.rotate + 'deg)',
- 'transform' : 'rotate(' + this.rotate + 'deg)'
- });
- this.setCanvasPosition();
},
crop : function()