From 869149892b7981e7fbcef89e873ff0b50ae868a6 Mon Sep 17 00:00:00 2001 From: Zachary Tong Date: Fri, 19 Apr 2013 10:34:49 -0400 Subject: [PATCH] Move dropdown options into scope so that it appears on panel creation --- panels/map2/module.js | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/panels/map2/module.js b/panels/map2/module.js index e31ba0f5a3b..031288c3aa7 100644 --- a/panels/map2/module.js +++ b/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); }