You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On init and on destroy of a layer, event handlers are removed from elements that sometimes don't even have handlers. The problem is this will call the getter layer._domEventHandler and will create a needless DOMEventManagerElement just so all handlers can be removed.
For example, @define "constraintValues" calls @off "change:parent", @parentChanged when set with null, which is done when applying defaults.
Also in Layer.destroy(), @_context.emit("layer:destroy", @) will trigger code that has the same effect.
All that work is just wasteful. Especially for Layers that never actually have any dom event handlers.
The text was updated successfully, but these errors were encountered:
Any code that calls @off for event handlers, will implicitly create a dom even wrapper because it is created in a getter. We need an alternative to the default getter that will not create a wrapper, and places that use it can skip a lot of work if there never was a wrapper.
I am not proposing to remove "layer:destroy", only to make the code that emits it follow the same code path that avoids creating needless wrappers.
On init and on destroy of a layer, event handlers are removed from elements that sometimes don't even have handlers. The problem is this will call the getter
layer._domEventHandler
and will create a needlessDOMEventManagerElement
just so all handlers can be removed.For example,
@define "constraintValues"
calls@off "change:parent", @parentChanged
when set withnull
, which is done when applying defaults.Also in
Layer.destroy()
,@_context.emit("layer:destroy", @)
will trigger code that has the same effect.All that work is just wasteful. Especially for Layers that never actually have any dom event handlers.
The text was updated successfully, but these errors were encountered: