Open karmaral opened 2 years ago
Hello. I'm making a box selection system and found that the e.stopPropagation() from the transformer prevents my callback to be run, so I modified the transformer to accept "attached callbacks" and run them on each of its internal callbacks.
e.stopPropagation()
Something like
this._attachedHandlers = { 'pointerdown': [], 'pointermove': [], 'pointerup': [(e) => console.log('pointerUp')] } onPointerUp(e) { ... e.stopPropagation(); this._attachedHandlers['pointerup'].forEach(callback => callback(e)); ... }
Would it be a welcome addition? If so I could make a pull request once I'm done with it (properly typed and function-wrapped obviously).
Sorry for the delayed response. Seems like a useful feature. I would be ok if you can create a PR with good code.
No worries. I will once I get back to it!
Hello. I'm making a box selection system and found that the
e.stopPropagation()
from the transformer prevents my callback to be run, so I modified the transformer to accept "attached callbacks" and run them on each of its internal callbacks.Something like
Would it be a welcome addition? If so I could make a pull request once I'm done with it (properly typed and function-wrapped obviously).