diff src/djol/declare-style.js @ 8:f0035923ff3e

добавлена библиотека для работы с openlayers 3+
author cin
date Mon, 21 Aug 2017 17:47:00 +0300
parents
children 1d72fddc319a
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/djol/declare-style.js	Mon Aug 21 17:47:00 2017 +0300
@@ -0,0 +1,20 @@
+define(["dojo/_base/declare","implab/safe"],function(declare, safe){
+    return function(base, proto){
+        var cls = declare(base,proto);
+        
+        var factory = function() {
+            var me = this;
+            cls.apply(me,arguments);
+            var fn = function() {
+                return me.getFeatureStyle.apply(me,arguments);
+            };
+            fn.style = me;
+            fn.styleFunction = fn;
+            return fn;
+        };
+        
+        factory.styleClass = cls; 
+        factory.prototype = cls.prototype;
+        return factory;
+    };
+});
\ No newline at end of file