Initialize radialMenu earlier

This prevents it from being undefined when exiting back to browse mode:
  in selectElements() (re 2024e233 crash if element id passed in url hash)
  in update() (possible re #2151?)
This commit is contained in:
Bryan Housel
2014-11-19 00:18:39 -05:00
parent 3974bcf41b
commit ebaaa4ba5a

View File

@@ -93,6 +93,8 @@ iD.modes.Select = function(context, selectedIDs) {
});
});
radialMenu = iD.ui.RadialMenu(context, operations);
context.ui().sidebar
.select(singular() ? singular().id : null, newFeature);
@@ -152,7 +154,6 @@ iD.modes.Select = function(context, selectedIDs) {
context.map().on('drawn.select', selectElements);
selectElements();
radialMenu = iD.ui.RadialMenu(context, operations);
var show = d3.event && !suppressMenu;
if (show) {