svgdotjs / svg.select.js

An extension of svg.js which allows to select an element

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

when use symbols,the rect's position is wrong

allen3371 opened this issue · comments

Thanks for your plugin,

when i use the symbol ,i got a problem

var draw = SVG('drawing').size(300, 300)

var symbol = draw.symbol()
symbol.rect(100, 100).fill('#f09')

var use  = draw.use(symbol).move(100, 100)
use.selectize()

the rect's position is wrong

ccc

Congratulation! It seems like you spotted a bug in Firefox. Bbox for the use element returns x:0, y:0 which is obviously wrong. Chrome does correctly return x:100, y:100 and therefore displays everyting right. However IE is also wrong.

I will report this to mozilla.

Is there any way to solve this problem?temporary

Not in the way its currectly implemented. You could fork this repo and add a hack for <use> and useragent firefox/IE11 but thats really ugly

// Bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1361639

thanks a lot!