diff src/djol/ClearTool.js @ 8:f0035923ff3e

добавлена библиотека для работы с openlayers 3+
author cin
date Mon, 21 Aug 2017 17:47:00 +0300
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/djol/ClearTool.js	Mon Aug 21 17:47:00 2017 +0300
@@ -0,0 +1,19 @@
+define (["dojo/_base/declare", "./_OneshotTool", "implab/safe"] , function(declare, _OneshotTool, safe) {
+    return declare([_OneshotTool], {
+        tools : null,
+        
+        constructor : function(opts) {
+            safe.mixin(this,opts, ["tools"]);
+        },
+        
+        invoke : function() {
+            if (this.tools) {
+                this.log("Clear {0} tools", this.tools.length);
+                safe.each(this.tools, function(tool) {
+                    if (tool.clear)
+                        tool.clear();
+                });
+            }
+        }
+    });
+});
\ No newline at end of file