javascript - "mouse:over" not firing and "mouse:down" returning undefined target using fabricJS -
here issue; trying display "markers" , on mouse over/out/click give actions.
the problem no event gets fired on over @ , when on click (down) in console feedback, not of element per (target == undefined).
my different shapes groups in group called "marker". , group following:
marker.add(plateshape, platelabel, line, indicator);
when using
marker.addwithupdate(plateshape, platelabel, line, indicator);
i feedback (over being finicky @ best) layout messed up.
you can comment/uncomment line 86 check behaviour in following fiddle.
https://jsfiddle.net/u7x7az1j/5/
thank help! :)
the problem comes use of add
.
replace add
addwithupdate
, aware addwithupdate
takes 1 parameter @ time.
marker.addwithupdate(plateshape); marker.addwithupdate(platelabel); marker.addwithupdate(line); marker.addwithupdate(indicator);
i tried on fiddle , works. consider replacing rect + triangle + line simple parametric fabric.path
can build.
Comments
Post a Comment