From: arno Date: Tue, 28 Sep 2010 19:25:12 +0000 (+0200) Subject: fixes: not possible to upload path after it has been droped from a file X-Git-Tag: v0.3~34 X-Git-Url: https://dev.renevier.net/?p=syj.git;a=commitdiff_plain;h=1360f97e0712ce7342f2afd87876bc39c10e6d48 fixes: not possible to upload path after it has been droped from a file --- diff --git a/public/js/syj.js b/public/js/syj.js index 8012d99..9d7f974 100644 --- a/public/js/syj.js +++ b/public/js/syj.js @@ -404,7 +404,20 @@ var SYJView = { } this.viewLayer.addFeatures([vector]); this.map.zoomToExtent(this.viewLayer.getDataExtent()); - this.editMode(); + + if ($("edit-btn")) { + $("edit-btn").click(); + } else if ($("create-btn")) { + $("create-btn").click(); + } + + if (this.editControl.handler.realPoints.length < 2) { + SyjSaveUI.disable(); + } else { + SyjSaveUI.enable(); + } + + if (vector.data && vector.data.name) { $("geom_title").value = vector.data.name; }