Closed pixelzoom closed 4 years ago
Problems were addressed in the above commits.
58bee29 does ES6 class conversion and deletes this.expandedProperty
and reset
. Sorry they had to be done in the same commit, but you were using this
before calling super. I confirmed the Reset All is working properly.
e5a9de3 deletes this.mutate
and passes all options via the superclass constructor.
@jbphet please review.
The changes look good and I tested the behavior and it looks correct. Thanks @pixelzoom. Closing.
Noted during conversion of AreaAndPerimeterDisplay.js to ES6 class for https://github.com/phetsims/tasks/issues/1044.
Three problems with AreaAndPerimeterDisplay:
(1) It defines
this.expandedProperty
, which is also defined in the superclass constructor(2) It overrides
reset
with a method that is identical to the superclassreset
.(3) It passes
options
to the superclass constructor and callsthis.mutate
. This is an anti-pattern that I'm running into frequently - maybe we should discuss?