javascript - Konva Propagate events between layers -


i have transparent drag layer on top of shape layer. works great make interaction distinct can toggle dragging (between scrolling view or editing shape positions). however, unless turn off drag mode (by hiding intervening transparent rect), none of other mouseover events fire on shape layer beneath it. need propogate non-drag mouse events layer below it. there lot of shapes mouse on events.

is there easy way propogate mouse on events layer beneath or need write custom handler fire events every shape?

i managed solve without having propagate events between layers. put draggable surface behind shapes on shape layer if shape isn't clicked. cover if shape clicked, on shape dragstart event, if layerdraggable flag set, stopdrag() on shape , startdrag() on layer. allowed me toggle simple flag whether want whole layer dragging, or shape.

i had clean little of shape position on dragend event, alternatively can dragbounds on shape.

shape.on('dragstart', function () {     if (layerdraggable) {         shape.stopdrag();         shapelayer.startdrag();     } } 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -