mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-03 21:48:03 +02:00
Center the radial menu on entities (fixes #483)
Also, don't show it when finishing draw operations.
This commit is contained in:
+10
-2
@@ -133,8 +133,16 @@ iD.modes.Select = function(entity, initial) {
|
||||
|
||||
radialMenu = iD.ui.RadialMenu(entity, history);
|
||||
|
||||
if (d3.event) {
|
||||
surface.call(radialMenu, d3.mouse(surface.node()));
|
||||
if (d3.event && !initial) {
|
||||
var loc = map.mouseCoordinates();
|
||||
|
||||
if (entity.type === 'node') {
|
||||
loc = entity.loc;
|
||||
} else if (entity.type === 'way') {
|
||||
loc = iD.geo.chooseIndex(entity, d3.mouse(map.surface.node()), map).loc;
|
||||
}
|
||||
|
||||
surface.call(radialMenu, map.projection(loc));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user