Closed pixelzoom closed 7 years ago
The above 2 issues are fixed. While testing, I ran into an unrelated assertion failure (#129) and had to comment out that assertion in order to complete testing. But with ?ea&fuzzMouse
, I see no more unlink
issues.
@jbphet please review. Especially confirm that the fix for (2) above was OK.
Hmmm... I just noticed that these issues were unlink
failures, and https://github.com/phetsims/axon/issues/140 (Phase 2) is related to removing the guard from link
. Why didn't these issues manifest during Phase 1? (https://github.com/phetsims/axon/issues/132).
Changes look good, thanks. No idea why these didn't show up during Phase 1.
Closing.
Related to https://github.com/phetsims/axon/issues/140. These are all "tried to removeListener on something that wasnt a listener" assertion failures.
(1) Expression
bind
creates a new function instance, solazyLink
andunlink
are being called with different functions. This can be fixed by creating one instance of the function and using it in these 2 places. I.e. in the constructor:(2) ExpressionOverlayNode
There is no corresponding
link
call.expression.inProgressAnimationProperty
appears as a updateDragHandlerAttachmentMultilink, which is already disposed. It's likely that this
unlinkis vestigial (from a time before the Property was a dependency of
updateDragHandlerAttachmentMultilink`) and can be deleted.