mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
mujma: BUGFIX: From now croping should appear without image flickering.
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@41932 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
cad57b11ec
commit
2c07f001f2
@ -110,7 +110,6 @@ var Crop = {
|
||||
startLeft = this.cropBox.getLeft() ;
|
||||
if(newWidth > 35 && newHeight > 35) {
|
||||
imageTransformation.crop(startTop,startLeft,newWidth,newHeight,Crop.cropCallback.bind(this));
|
||||
imageHistory.enable();
|
||||
} else {
|
||||
alert('Crop area too small');
|
||||
}
|
||||
@ -119,10 +118,9 @@ var Crop = {
|
||||
},
|
||||
|
||||
cropCallback: function() {
|
||||
this.resizeCropBox.placeClickBox();
|
||||
effects.enableRotate();
|
||||
this.enable();
|
||||
|
||||
resize.imageContainerResize.placeClickBox();
|
||||
resize.imageContainerResize.setVisible(true);
|
||||
Element.hide(this.cropBox,this.leftGreyBox,this.rightGreyBox,this.upperGreyBox,this.lowerGreyBox,$('cropOk'),$('cropCancel'));
|
||||
},
|
||||
|
||||
setListeners: function() {
|
||||
|
@ -37,10 +37,11 @@ var ImageToResize = {
|
||||
resize.imageContainerResize.originalHeight = this.imageToResize.height;
|
||||
resize.imageContainerResize.placeClickBox();
|
||||
imageBox.checkOutOfDrawingArea($('imageContainer').getWidth(),$('imageContainer').getHeight());
|
||||
crop.onImageLoadCallback();
|
||||
crop.enable();
|
||||
resize.imageContainerResize.enable();
|
||||
effects.enableRotate();
|
||||
imageHistory.enable();
|
||||
crop.onImageLoadCallback();
|
||||
}
|
||||
this.reportSize();
|
||||
},
|
||||
|
@ -73,8 +73,8 @@ var ImageTransformation = {
|
||||
$('image').style.height = response.height + 'px';
|
||||
$('imageContainer').style.width = response.width + 'px';
|
||||
$('imageContainer').style.height = response.height + 'px';
|
||||
imageHistory.add('crop',$('image').src);
|
||||
if(callback != null) callback();
|
||||
imageHistory.add('crop',$('image').src);
|
||||
}
|
||||
};
|
||||
imageBox.showIndicator();
|
||||
|
Loading…
Reference in New Issue
Block a user