mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-25 23:13:42 +00:00
Work around browser incompatibilities
This commit is contained in:
@@ -66,7 +66,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;
|
||||
|
||||
Reference in New Issue
Block a user