Merge pull request #49 from harikk/patch-2

Fix for issue #48 - improper placement of rubber-band box for 'use' elements.
master
Jeff Schiller 2016-01-16 12:35:54 -08:00
commit 8e4875bf5d
1 changed files with 2 additions and 2 deletions

View File

@ -500,14 +500,14 @@ svgedit.utilities.getBBox = function(elem) {
// This is resolved in later versions of webkit, perhaps we should // This is resolved in later versions of webkit, perhaps we should
// have a featured detection for correct 'use' behavior? // have a featured detection for correct 'use' behavior?
// —————————— // ——————————
//if(!svgedit.browser.isWebkit()) { if(!svgedit.browser.isWebkit()) {
var bb = {}; var bb = {};
bb.width = ret.width; bb.width = ret.width;
bb.height = ret.height; bb.height = ret.height;
bb.x = ret.x + parseFloat(selected.getAttribute('x')||0); bb.x = ret.x + parseFloat(selected.getAttribute('x')||0);
bb.y = ret.y + parseFloat(selected.getAttribute('y')||0); bb.y = ret.y + parseFloat(selected.getAttribute('y')||0);
ret = bb; ret = bb;
//} }
} else if(~visElems_arr.indexOf(elname)) { } else if(~visElems_arr.indexOf(elname)) {
if (selected) { ret = selected.getBBox(); } if (selected) { ret = selected.getBBox(); }
else { else {