Просмотр исходного кода

Move dropdown options into scope so that it appears on panel creation

Zachary Tong 12 лет назад
Родитель
Сommit
869149892b
1 измененных файлов с 12 добавлено и 20 удалено
  1. 12 20
      panels/map2/module.js

+ 12 - 20
panels/map2/module.js

@@ -16,7 +16,17 @@ angular.module('kibana.map2', [])
         scale:-1,
         data: {
           samples: 1000,
-          type: "mercator"
+          type: "mercator",
+          dropdown:[
+            {
+              "text": "Mercator (Flat)",
+              id: "mercator"
+            },
+            {
+              text: "Orthographic (Sphere)",
+              id: "orthographic"
+            }
+          ]
         },
         geopoints: {
           enabled: false,
@@ -187,24 +197,6 @@ angular.module('kibana.map2', [])
         dr.worldData = null;
         dr.worldNames = null;
 
-        //These are various options that should not be cached in scope.panel
-        dr.options = {
-
-          data: {
-            dropdown:[
-              {
-                "text": "Mercator (Flat)",
-                id: "mercator"
-              },
-              {
-                text: "Orthographic (Sphere)",
-                id: "orthographic"
-              }
-            ]
-          }
-        };
-
-
         /**
          * Initialize the panels if new, or render existing panels
          */
@@ -403,7 +395,7 @@ angular.module('kibana.map2', [])
           //Special fix for when the user changes from mercator -> orthographic
           //The globe won't redraw automatically, we need to force it
           if (scope.panel.display.data.type === 'orthographic') {
-            //dr.svg.selectAll("path").attr("d", dr.path);
+            dr.svg.selectAll("path").attr("d", dr.path);
           }