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() ;
|
startLeft = this.cropBox.getLeft() ;
|
||||||
if(newWidth > 35 && newHeight > 35) {
|
if(newWidth > 35 && newHeight > 35) {
|
||||||
imageTransformation.crop(startTop,startLeft,newWidth,newHeight,Crop.cropCallback.bind(this));
|
imageTransformation.crop(startTop,startLeft,newWidth,newHeight,Crop.cropCallback.bind(this));
|
||||||
imageHistory.enable();
|
|
||||||
} else {
|
} else {
|
||||||
alert('Crop area too small');
|
alert('Crop area too small');
|
||||||
}
|
}
|
||||||
@ -119,10 +118,9 @@ var Crop = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
cropCallback: function() {
|
cropCallback: function() {
|
||||||
this.resizeCropBox.placeClickBox();
|
resize.imageContainerResize.placeClickBox();
|
||||||
effects.enableRotate();
|
resize.imageContainerResize.setVisible(true);
|
||||||
this.enable();
|
Element.hide(this.cropBox,this.leftGreyBox,this.rightGreyBox,this.upperGreyBox,this.lowerGreyBox,$('cropOk'),$('cropCancel'));
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
setListeners: function() {
|
setListeners: function() {
|
||||||
|
@ -37,10 +37,11 @@ var ImageToResize = {
|
|||||||
resize.imageContainerResize.originalHeight = this.imageToResize.height;
|
resize.imageContainerResize.originalHeight = this.imageToResize.height;
|
||||||
resize.imageContainerResize.placeClickBox();
|
resize.imageContainerResize.placeClickBox();
|
||||||
imageBox.checkOutOfDrawingArea($('imageContainer').getWidth(),$('imageContainer').getHeight());
|
imageBox.checkOutOfDrawingArea($('imageContainer').getWidth(),$('imageContainer').getHeight());
|
||||||
crop.onImageLoadCallback();
|
|
||||||
crop.enable();
|
crop.enable();
|
||||||
resize.imageContainerResize.enable();
|
resize.imageContainerResize.enable();
|
||||||
effects.enableRotate();
|
effects.enableRotate();
|
||||||
|
imageHistory.enable();
|
||||||
|
crop.onImageLoadCallback();
|
||||||
}
|
}
|
||||||
this.reportSize();
|
this.reportSize();
|
||||||
},
|
},
|
||||||
|
@ -73,8 +73,8 @@ var ImageTransformation = {
|
|||||||
$('image').style.height = response.height + 'px';
|
$('image').style.height = response.height + 'px';
|
||||||
$('imageContainer').style.width = response.width + 'px';
|
$('imageContainer').style.width = response.width + 'px';
|
||||||
$('imageContainer').style.height = response.height + 'px';
|
$('imageContainer').style.height = response.height + 'px';
|
||||||
imageHistory.add('crop',$('image').src);
|
|
||||||
if(callback != null) callback();
|
if(callback != null) callback();
|
||||||
|
imageHistory.add('crop',$('image').src);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
imageBox.showIndicator();
|
imageBox.showIndicator();
|
||||||
|
Loading…
Reference in New Issue
Block a user