From 4bd61f8113e4640011b7aea69907d5bcc0934414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20MAGIS?= Date: Thu, 17 Aug 2017 09:14:34 +1100 Subject: [PATCH] Change version number --- Widget.js | 65 ++++++++++++++++++++++++++------------------------- manifest.json | 8 +++---- 2 files changed, 37 insertions(+), 36 deletions(-) diff --git a/Widget.js b/Widget.js index 5c2f149..5077754 100644 --- a/Widget.js +++ b/Widget.js @@ -12,6 +12,7 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. +// limitations under the License. /////////////////////////////////////////////////////////////////////////// define([ 'dojo/_base/declare', @@ -247,7 +248,7 @@ define([ this.map.setExtent(ext, true); return true; }, - + copy:function(){ var graphics = this.getCheckedGraphics(false); var nb = graphics.length; @@ -256,8 +257,8 @@ define([ this.showMessage(this.nls.noSelection, 'error'); return false; } - - for(var i=0;i ' + this.nls.confirmDrawCheckedDelete, buttons:[ @@ -299,23 +300,23 @@ define([ this._removeGraphics(graphics); } }, - + _removeClickedGraphic:function(){ if(!this._clickedGraphic) return false; - + this._removeGraphic(this._clickedGraphic); this._editorConfig["graphicCurrent"] = false; - this.listGenerateDrawTable(); - + this.listGenerateDrawTable(); + this._clickedGraphic = false; - + if(this._confirmDeleteMessage && this._confirmDeleteMessage.close){ this._confirmDeleteMessage.close(); this._confirmDeleteMessage = false; } }, - + _removeGraphics:function(graphicsOrEvent){ if(graphicsOrEvent.target) graphics = this.getCheckedGraphics(false); @@ -326,12 +327,12 @@ define([ for (var i = 0; i < nb; i++) { this._removeGraphic(graphics[i]); } - + if(this._confirmDeleteMessage && this._confirmDeleteMessage.close){ this._confirmDeleteMessage.close(); this._confirmDeleteMessage = false; } - + this.setInfoWindow(false); this.setMode("list"); }, @@ -348,9 +349,9 @@ define([ drawingsGetJson : function (asString, onlyChecked) { var graphics = (onlyChecked) ? this.getCheckedGraphics(false) : this.drawBox.drawLayer.graphics; - + var nb_graphics = graphics.length; - + if (nb_graphics < 1) return (asString) ? '' : false; @@ -650,7 +651,7 @@ define([ break; case 'draw-action-delete': this._clickedGraphic = g; - if(this.config.confirmOnDelete){ + if(this.config.confirmOnDelete){ this._confirmDeleteMessage = new Message({ message : ' ' + this.nls.confirmDrawDelete, buttons:[ @@ -796,9 +797,9 @@ define([ this._UTIL__enableClass(this.editorTextPlusUnderlineNode, 'selected', this._editorConfig["drawPlus"]["underline"]); for (var i = 0, len = this._editorTextPlusPlacements.length ; i < len ; i++) { var title_tab = this._editorTextPlusPlacements[i].title.split(" "); - var selected = + var selected = ( - title_tab[0] == this._editorConfig["drawPlus"]["placement"]["vertical"] + title_tab[0] == this._editorConfig["drawPlus"]["placement"]["vertical"] && title_tab[1] == this._editorConfig["drawPlus"]["placement"]["horizontal"] ); this._UTIL__enableClass(this._editorTextPlusPlacements[i], 'selected', selected); @@ -980,7 +981,7 @@ define([ var content = '
' + '' + '
'+this.nls.importDragAndDropMessage+'
' - + '
'; + + ''; this.importMessage = new Message({ message : content, titleLabel:this.nls.importTitle, @@ -989,7 +990,7 @@ define([ }] }); this.importInput = dojo.byId(this.id+'___input_file_import'); - + //Init file's choice up watching on(this.importInput, "change", this.importFile); @@ -1005,7 +1006,7 @@ define([ e.stopPropagation(); e.preventDefault(); var files = e.dataTransfer.files; - + if(!files[0]) return; var reader = new FileReader(); @@ -1013,7 +1014,7 @@ define([ var txt = reader.readAsText(files[0]); })); }, - + importFile : function () { if(!this.importInput){ this.showMessage(this.nls.importErrorWarningSelectFile, 'warning'); @@ -1021,7 +1022,7 @@ define([ this.importMessage.close(); return false; } - + var input_file = this.importInput.files[0]; if (!input_file) { this.showMessage(this.nls.importErrorWarningSelectFile, 'warning'); @@ -1031,7 +1032,7 @@ define([ reader.onload = this.importOnFileLoad; var txt = reader.readAsText(input_file); }, - + importOnFileLoad : function (evt) { var content = evt.target.result; this.importJsonContent(content); @@ -1746,7 +1747,7 @@ define([ graphic.measure = false; return false; } - + var pointPattern = (this.config.measurePointLabel) ? this.config.measurePointLabel : "{{x}} {{y}}"; var polygonPattern = (this.config.measurePolygonLabel) ? this.config.measurePolygonLabel : "{{area}} {{areaUnit}} {{length}} {{lengthUnit}}"; var polylinePattern = (this.config.measurePolylineLabel) ? this.config.measurePolylineLabel : "{{length}} {{lengthUnit}}"; @@ -1824,22 +1825,22 @@ define([ //Point if (geometry.x) return geometry; - + //Polygon if (geometry.getCendroid) return geometry.getCendroid(); - + //Polyline if (geometry.getExtent) { var extent_center = geometry.getExtent().getCenter(); - + //If geometryEngine, replace point (extent center) on geometry if (this.config.useGeometryEngine) { var res = geometryEngine.nearestCoordinate(geometry, extent_center); if (res && res.coordinate) return res.coordinate; } - + return extent_center; } @@ -1978,7 +1979,7 @@ define([ //Bind symbol chooser change this.own(on(this.editorSymbolChooser, 'change', lang.hitch(this, function () { this.editorSetDefaultSymbols(); - + //If text plus if (this.editorSymbolChooser.type == "text") { this.editorUpdateTextPlus(); @@ -2000,7 +2001,7 @@ define([ //hitch import file loading this.importFile = lang.hitch(this, this.importFile); this.importOnFileLoad = lang.hitch(this, this.importOnFileLoad); - + //Bind delete method this._removeGraphics = lang.hitch(this, this._removeGraphics); this._removeClickedGraphic = lang.hitch(this, this._removeClickedGraphic); diff --git a/manifest.json b/manifest.json index 7072b6d..9a379ab 100644 --- a/manifest.json +++ b/manifest.json @@ -1,10 +1,10 @@ { "name": "eDraw", "platform": "HTML", - "version": "2.1.2", - "wabVersion": "2.1", - "author" : "Esri R&D Center Beijing modified by MAGIS NC", + "version": "2.5.1", + "wabVersion": "2.5", + "author" : "MAGIS NC", "description": "Enhanced draw widget for WebApp Builder for Arcgis.", "copyright": "", "license": "http://www.apache.org/licenses/LICENSE-2.0" -} \ No newline at end of file +}