提交 eac51084 编写于 作者: 蔡祥熠

Merge branch 'fix/Process.imageclipper_selectImage' into 'wrdp'

Merge of fix/Process.imageclipper_selectImage 修复图片编辑器 to wrdp

See merge request o2oa/o2oa!4569
......@@ -9,8 +9,8 @@ MWF.xApplication.cms.Xform.ImageClipper = MWF.CMSImageClipper = new Class({
if( clipperType == "unrestricted" ){
ratio = 0;
}else if( clipperType == "size" ){
var width = this.json.imageWidth.toInt();
var height = this.json.imageHeight.toInt();
var width = ( this.json.imageWidth ) ? this.json.imageWidth.toInt() : 600;
var height = ( this.json.imageHeight ) ? this.json.imageHeight.toInt() : 500;
ratio = width / height;
//maxSize = Math.max( width, height );
if( !isNaN( width ) && !isNaN( height ) ){
......
......@@ -38,8 +38,8 @@ MWF.xApplication.process.Xform.ImageClipper = MWF.APPImageClipper = new Class(
"max-width": "90%"
})
}else if( this.json.clipperType == "size" ){
var width = this.json.imageWidth.toInt();
var height = this.json.imageHeight.toInt();
var width = ( this.json.imageWidth ) ? this.json.imageWidth.toInt() : 600;
var height = ( this.json.imageHeight ) ? this.json.imageHeight.toInt() : 500;
if( width && height ){
img.setStyles({
width : width+"px",
......@@ -137,8 +137,8 @@ MWF.xApplication.process.Xform.ImageClipper = MWF.APPImageClipper = new Class(
"max-width": "90%"
})
}else if( this.json.clipperType == "size" ){
var width = this.json.imageWidth.toInt();
var height = this.json.imageHeight.toInt();
var width = (this.json.imageWidth) ? this.json.imageWidth.toInt() : 600;
var height = (this.json.imageHeight) ? this.json.imageHeight.toInt() : 500;
if (width && height) {
img.setStyles({
width: width + "px",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册