phetsims / molecule-polarity

"Molecule Polarity" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 6 forks source link

Use default layoutBonds #146

Closed pixelzoom closed 1 year ago

pixelzoom commented 2 years ago

Related to https://github.com/phetsims/joist/issues/542 ... This sim uses non-standard layoutBounds. In MPConstants.ts:

LAYOUT_BOUNDS: new Bounds2( 0, 0, 1100, 700 ),

Someday it should be converted to standard (default) layoutBounds, as specified in ScreenView.ts:

const DEFAULT_LAYOUT_BOUNDS = new Bounds2( 0, 0, 1024, 618 );
pixelzoom commented 1 year ago

Another thing to consider if we ever did this... Changing the layoutBounds will require changing the position of everything on the screen. For anything that has a postionProperty, it's value will need to change. That will create serious problems for PhET-iO clients who have set custom values of positionProperty, and it's unlikely to be something that can be addressed by migration rules.

pixelzoom commented 1 year ago

Per https://github.com/phetsims/phet-io/issues/1939 ... This sim has been published for PhET-iO, so we cannot change layoutBounds without potentially disrupting client customizations. So we will not change the layoutBounds. Documented in MPConstants.ts in the above commit:

  // While these layoutBounds differ from the default, PhET-iO customizations may rely on these bounds.
  // So do not change. See https://github.com/phetsims/molecule-polarity/issues/146
  LAYOUT_BOUNDS: new Bounds2( 0, 0, 1100, 700 ),

Closing.