phetsims / hookes-law

"Hooke's Law" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 4 forks source link

branch: data-flow #66

Closed chrisklus closed 2 months ago

chrisklus commented 5 years ago

@samreid and I are investigating here for setting up one-directional data flow for properties tied to UI components. See https://github.com/phetsims/phet-io/issues/1349

pixelzoom commented 5 years ago

@chrisklus @samreid

You added these "guards" to ReentrantScreen with commit message "Added guards around property links to indicate data flow direction":

     this.xPropertyIsUserControlledProperty = new BooleanProperty( false );
     this.fPropertyIsUserControlledProperty = new BooleanProperty( false );
     this.pPropertyIsUserControlledProperty = new BooleanProperty( false );

This approach seems to assume that user control of the guarded Properties is mutually exclusive. Please explain how this works with multi-touch. Was this approach tested with multi-touch? Are you assuming that we will change the multi-touch requirements for this sim?

samreid commented 5 years ago

What part of the implementation suggests that it won't support multi-touch? The properties such as userControlledXProperty could be passed to multiple touch interface components and it would still have the same effect of controlling the directionality of the data flow (between model and view). This would neither address pre-existing multi-touch issues nor introduce new multi-touch issues. This is all about controlling the directionality of data flow between the model and view.

samreid commented 5 years ago

I should also say that recent changes to DynamicProperty to prevent back-propagation may make this effort unnecessary.

pixelzoom commented 5 years ago

The Reentrant screen now lives in this branch only, it has been deleted from master. See #65.

pixelzoom commented 2 months ago

@samreid Can this branch be deleted?

samreid commented 2 months ago

This branch can be deleted.

pixelzoom commented 2 months ago

This branch has been deleted.