]> dev.renevier.net Git - syj.git/blobdiff - public/js/syj.js
fixes: not possible to upload path after it has been droped from a file
[syj.git] / public / js / syj.js
index 3606cd07eb50b5290262d3c53606723cb8e26696..9d7f974793222537f14a502d7b9cd75cd75013e8 100644 (file)
@@ -388,7 +388,7 @@ var SYJView = {
                         } catch(e) {
                         }
                         if (results || results.length) {
-                            break;
+                            continue;
                         }
                     }
                     if (!results || !results.length) {
@@ -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;
                     }