D
djbaker
Alright, I am going to try to be as clear as possible because this
might be confusing.
I have a canvas on top of a div. I need the canvas there so that its
eventlisteners can pick up someone drawing. The div has its own set of
event listeners and the drawing on the top canvas can be toggled. I.e.
you can turn off drawing so that you can instead select and move
something contained within the lower div.
The problem I am having now though is that the eventlisteners on the
lower div won't fire, I am guessing because all the input is being
absorbed by the top canvas.
Is there any way to have the eventlisteners on an element below another
element pick up the user action? I tried using zIndex to move the
layers around when someoen toggles drawing so that the lower div was
ontop and I managed to move the layers, but it broke the event
listeners on both.
Any ideas?
might be confusing.
I have a canvas on top of a div. I need the canvas there so that its
eventlisteners can pick up someone drawing. The div has its own set of
event listeners and the drawing on the top canvas can be toggled. I.e.
you can turn off drawing so that you can instead select and move
something contained within the lower div.
The problem I am having now though is that the eventlisteners on the
lower div won't fire, I am guessing because all the input is being
absorbed by the top canvas.
Is there any way to have the eventlisteners on an element below another
element pick up the user action? I tried using zIndex to move the
layers around when someoen toggles drawing so that the lower div was
ontop and I managed to move the layers, but it broke the event
listeners on both.
Any ideas?