Hi,
im trying to use Custom (external) Crop to have fixed crop dimensions (256 x 256) at dialog load. I have the two following issues (im using Q3 2012 btw):
1-In Chrome (Version 31.0.1650.63 m), if only my website in deployed on the server (in localhost, no problem), the dimension always falls to 258 x 258. I tried all these browsers (deployed and local) and they all have the same behavior than Chrome local (good): IE8,IE11,FF,Opera,Safari Ive checked the code from ImageEditorDialogs\Crop.ascx and the difference I see here might give us hints:
2-In FF 26.0,
im trying to use Custom (external) Crop to have fixed crop dimensions (256 x 256) at dialog load. I have the two following issues (im using Q3 2012 btw):
1-In Chrome (Version 31.0.1650.63 m), if only my website in deployed on the server (in localhost, no problem), the dimension always falls to 258 x 258. I tried all these browsers (deployed and local) and they all have the same behavior than Chrome local (good): IE8,IE11,FF,Opera,Safari Ive checked the code from ImageEditorDialogs\Crop.ascx and the difference I see here might give us hints:
<asp:Label ID="Label1" Text='<%$ appSettings:ImageResizeWidth %>' runat="server" style="display: none;" />
<asp:Label ID="Label2" Text='<%$ appSettings:ImageResizeHeight %>' runat="server" style="display: none;" />
initialize: function () { $IE.Crop.callBaseMethod(this, "initialize"); this._xTxt = this._getControlFromParent("txtX"); this._yTxt = this._getControlFromParent("txtY"); this._widthTxt = this._getControlFromParent("txtWidth"); this._heightTxt = this._getControlFromParent("txtHeight"); this._presetDD = this._findControlFromParent("rieAspectRatio"); this._cropBtn = this._findControlFromParent("btnApply"); this._cancelBtn = this._findControlFromParent("btnCancel"); this._constraintBtn = this._findControlFromParent("btnConstraint"); this._swapBtn = this._findControlFromParent("btnSwap"); this._sizeRatio = null; this._zoomLevel = this._getImageZoomLevel(); this._createCropBox(); this._updateControlsFromCropBox(); this._constraintBtnClick(this._constraintBtn); this._attachHandlers(true); this.get_imageEditor().get_formDecorator().decorate($get(this.get_parentId() + "Table")); this.set_width(this._getControlFromParent("Label1").innerText); //where the size fixing is called this.set_height(this._getControlFromParent("Label2").innerText); //where the size fixing is called },... set_width: function (value) { var imageSize = this.get_imageSize(); var bounds = this._cropBox.getBounds(); alert(bounds.x); //returns in Chrome deployed -0.000002741..... all other returns 0 alert(imageSize.width); //returns in Chrome deployed 257..... all other returns 256 value = this._restrictValue(value, 0, imageSize.width - bounds.x); alert(imageSize.height); //returns in Chrome deployed 257..... all other returns 256 alert(bounds.y); //returns in Chrome deployed -0.000002741..... all other returns 0 value = this._applyWidthConstraintRatio(value, imageSize.height - bounds.y); this.set_inputValue(this._widthTxt, value); }2-In FF 26.0,
this._getControlFromParent("Label1").innerText and this._getControlFromParent("Label2").innerText from code above returns "undefined" instead of 256 like all other browsers mentioned.
Please help
TIA
