From: John Firebaugh Date: Fri, 9 Aug 2013 21:59:50 +0000 (-0700) Subject: iD 1.1.1 X-Git-Tag: live~5397 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/25792ba304a7de2fe45a6a320bc97a6b47185535 iD 1.1.1 --- diff --git a/vendor/assets/iD/iD.js b/vendor/assets/iD/iD.js index 3cb6da7cc..9abb7ed44 100644 --- a/vendor/assets/iD/iD.js +++ b/vendor/assets/iD/iD.js @@ -15232,7 +15232,7 @@ window.iD = function () { return d3.rebind(context, dispatch, 'on'); }; -iD.version = '1.1.0'; +iD.version = '1.1.1'; (function() { var detected = {}; @@ -17324,9 +17324,12 @@ iD.behavior.Draw = function(context) { function draw(selection) { context.install(hover); - context.install(tail); context.install(edit); + if (!iD.behavior.Draw.usedTails[tail.text()]) { + context.install(tail); + } + keybinding .on('⌫', backspace) .on('⌦', del) @@ -17345,9 +17348,13 @@ iD.behavior.Draw = function(context) { draw.off = function(selection) { context.uninstall(hover); - context.uninstall(tail); context.uninstall(edit); + if (!iD.behavior.Draw.usedTails[tail.text()]) { + context.uninstall(tail); + iD.behavior.Draw.usedTails[tail.text()] = true; + } + selection .on('mousedown.draw', null) .on('mousemove.draw', null); @@ -17360,10 +17367,7 @@ iD.behavior.Draw = function(context) { }; draw.tail = function(_) { - if (!_ || iD.behavior.Draw.usedTails[_] === undefined) { - tail.text(_); - iD.behavior.Draw.usedTails[_] = true; - } + tail.text(_); return draw; }; @@ -24443,6 +24447,7 @@ iD.ui.EntityEditor = function(context) { .entityID(id)); function historyChanged() { + if (state === 'hide') return; var entity = context.hasEntity(id); if (!entity) return; entityEditor.preset(context.presets().match(entity, context.graph())); @@ -24985,6 +24990,7 @@ iD.ui.Inspector = function(context) { inspector.state = function(_) { if (!arguments.length) return state; state = _; + entityEditor.state(state); return inspector; }; @@ -25956,7 +25962,9 @@ iD.ui.RadialMenu = function(context, operations) { .attr('class', 'tooltip-inner radial-menu-tooltip'); function mouseover(d, i) { - var rect = context.surface().node().getBoundingClientRect(), + // Avoid getBoundingClientRect on SVG element; browser implementations + // differ: http://stackoverflow.com/questions/18153989/ + var rect = context.surface().node().parentNode.getBoundingClientRect(), angle = a0 + i * a, dx = rect.left - (angle < 0 ? 200 : 0), dy = rect.top; @@ -26669,6 +26677,7 @@ iD.ui.Sidebar = function(context) { } else if (!current) { featureListWrap.classed('inspector-hidden', false); inspectorWrap.classed('inspector-hidden', true); + inspector.state('hide'); } }; @@ -26689,6 +26698,7 @@ iD.ui.Sidebar = function(context) { } else if (!current) { featureListWrap.classed('inspector-hidden', false); inspectorWrap.classed('inspector-hidden', true); + inspector.state('hide'); } };