mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-25 14:54:24 +02:00
Fix elementsOverlap function for SVG elements
Access SVG getBBox function to acquire the bounding box for SVG elements
This commit is contained in:
parent
a352131d65
commit
28f5ef2284
@ -217,9 +217,9 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var at = aoff.top;
|
var at = aoff.top;
|
||||||
var ah = a.offsetHeight;
|
var ah = a.offsetHeight || (a.getBBox && a.getBBox().height);
|
||||||
var al = aoff.left;
|
var al = aoff.left;
|
||||||
var aw = a.offsetWidth;
|
var aw = a.offsetWidth || (a.getBBox && a.getBBox().width);
|
||||||
|
|
||||||
// b bounds
|
// b bounds
|
||||||
var boff = $(b).offset();
|
var boff = $(b).offset();
|
||||||
@ -227,9 +227,9 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var bt = boff.top;
|
var bt = boff.top;
|
||||||
var bh = b.offsetHeight;
|
var bh = b.offsetHeight || (b.getBBox && b.getBBox().height);
|
||||||
var bl = boff.left;
|
var bl = boff.left;
|
||||||
var bw = b.offsetWidth;
|
var bw = b.offsetWidth || (b.getBBox && b.getBBox().width);
|
||||||
|
|
||||||
return !(at > (bt + bh) || bt > (at + ah)) && !(bl > (al + aw) || al > (bl + bw));
|
return !(at > (bt + bh) || bt > (at + ah)) && !(bl > (al + aw) || al > (bl + bw));
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user