phetsims / axon

Axon provides powerful and concise models for interactive simulations, based on observable Properties and related patterns.
MIT License
10 stars 8 forks source link

PropertyIO should call to ReadOnlyProperty.toStateObject() #454

Closed zepumph closed 3 weeks ago

zepumph commented 3 weeks ago

This refactor will help with https://github.com/phetsims/phet-io/issues/1881#issuecomment-2155615116. Over there, we would like to hide an implementation detail for the serialization of a subtype of Property, but don't need to (or want to) change the PhET-iO api. Allowing the instance method toStateObject to be overridden will help us do this.

zepumph commented 3 weeks ago

https://github.com/phetsims/joist/issues/970

zepumph commented 3 weeks ago

Looks good and we are MRing to hydrogen sims for https://github.com/phetsims/joist/issues/970. Closing