phetsims / quadrilateral

"Quadrilateral" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
1 stars 3 forks source link

The modelBoundsProperty does not need to be observable #338

Closed jessegreenberg closed 1 year ago

jessegreenberg commented 1 year ago

At the very beginning of development we made the model bounds change with available window size. Now it is locked at startup. It will simplify a lot of code to remove this Property.

jessegreenberg commented 1 year ago

There are ~50 lines of complicated view code that set up the model bounds that will also be good to get rid of. The model bounds can now be static and declared in the model.

https://github.com/phetsims/quadrilateral/blob/5e6b01cd548da1a28018477072e749c1c98b260f/js/quadrilateral/view/QuadrilateralScreenView.ts#L112-L153

jessegreenberg commented 1 year ago

This issue means vertexDragBounds will also no longer be a Property.

EDIT: patch for next time:

```patch Subject: [PATCH] Combine fireOnKeyDown and fireOnKeyUp options, see https://github.com/phetsims/scenery/issues/1520 --- Index: js/quadrilateral/view/QuadrilateralGridNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/js/quadrilateral/view/QuadrilateralGridNode.ts b/js/quadrilateral/view/QuadrilateralGridNode.ts --- a/js/quadrilateral/view/QuadrilateralGridNode.ts (revision 20d382c13b5e32bc0384335703d9682275f10e9a) +++ b/js/quadrilateral/view/QuadrilateralGridNode.ts (date 1675122638483) @@ -9,7 +9,6 @@ import quadrilateral from '../../quadrilateral.js'; import { Node, Path, Rectangle } from '../../../../scenery/js/imports.js'; import Bounds2 from '../../../../dot/js/Bounds2.js'; -import Property from '../../../../axon/js/Property.js'; import ModelViewTransform2 from '../../../../phetcommon/js/view/ModelViewTransform2.js'; import QuadrilateralColors from '../../common/QuadrilateralColors.js'; import TReadOnlyProperty from '../../../../axon/js/TReadOnlyProperty.js'; @@ -30,7 +29,7 @@ const BORDER_RECTANGLE_LINE_WIDTH = 2; class QuadrilateralGridNode extends Node { - public constructor( modelBoundsProperty: Property, visibleProperty: TReadOnlyProperty, modelViewTransform: ModelViewTransform2 ) { + public constructor( modelBounds: Bounds2, visibleProperty: TReadOnlyProperty, modelViewTransform: ModelViewTransform2 ) { super(); // Rectangle showing available model bounds @@ -49,26 +48,22 @@ } ); this.addChild( gridLines ); - modelBoundsProperty.link( modelBounds => { - if ( modelBounds ) { - const lineShape = new Shape(); + const lineShape = new Shape(); - // dilate just enough for the quadrilateral shape to never overlap the stroke - const modelLineWidth = modelViewTransform.viewToModelDeltaX( BORDER_RECTANGLE_LINE_WIDTH ); - const dilatedBounds = modelBounds.dilated( modelLineWidth ); + // dilate just enough for the quadrilateral shape to never overlap the stroke + const modelLineWidth = modelViewTransform.viewToModelDeltaX( BORDER_RECTANGLE_LINE_WIDTH ); + const dilatedBounds = modelBounds.dilated( modelLineWidth ); - boundsRectangle.setRectBounds( modelViewTransform.modelToViewBounds( dilatedBounds ) ); + boundsRectangle.setRectBounds( modelViewTransform.modelToViewBounds( dilatedBounds ) ); - this.drawVerticalLines( lineShape, dilatedBounds, QuadrilateralConstants.GRID_SPACING ); - this.drawHorizontalLines( lineShape, dilatedBounds, QuadrilateralConstants.GRID_SPACING ); - majorGridLinePath.shape = modelViewTransform.modelToViewShape( lineShape ); + this.drawVerticalLines( lineShape, dilatedBounds, QuadrilateralConstants.GRID_SPACING ); + this.drawHorizontalLines( lineShape, dilatedBounds, QuadrilateralConstants.GRID_SPACING ); + majorGridLinePath.shape = modelViewTransform.modelToViewShape( lineShape ); - const minorDebugShape = new Shape(); - this.drawVerticalLines( minorDebugShape, dilatedBounds, QuadrilateralQueryParameters.minorVertexInterval ); - this.drawHorizontalLines( minorDebugShape, dilatedBounds, QuadrilateralQueryParameters.minorVertexInterval ); - minorGridLinePath.shape = modelViewTransform.modelToViewShape( minorDebugShape ); - } - } ); + const minorDebugShape = new Shape(); + this.drawVerticalLines( minorDebugShape, dilatedBounds, QuadrilateralQueryParameters.minorVertexInterval ); + this.drawHorizontalLines( minorDebugShape, dilatedBounds, QuadrilateralQueryParameters.minorVertexInterval ); + minorGridLinePath.shape = modelViewTransform.modelToViewShape( minorDebugShape ); visibleProperty.link( visible => { gridLines.visible = visible; } ); } Index: js/common/QuadrilateralConstants.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/js/common/QuadrilateralConstants.ts b/js/common/QuadrilateralConstants.ts --- a/js/common/QuadrilateralConstants.ts (revision 20d382c13b5e32bc0384335703d9682275f10e9a) +++ b/js/common/QuadrilateralConstants.ts (date 1675122157458) @@ -21,6 +21,10 @@ // Amount of spacing in model coordinates between grid lines in the visual grid GRID_SPACING: 0.25, + // TODO: Documentation, calculate from grid spacing? Or calculate grid spacing from these? + BOUNDS_WIDTH: 3.1, + BOUNDS_HEIGHT: 2.1, + // The "major" vertex interval when using ?reducedStepSize query parameter. Value is in model coordinates. MAJOR_REDUCED_SIZE_VERTEX_INTERVAL: 0.0625, Index: js/quadrilateral/view/QuadrilateralDiagonalGuidesNode.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/js/quadrilateral/view/QuadrilateralDiagonalGuidesNode.ts b/js/quadrilateral/view/QuadrilateralDiagonalGuidesNode.ts --- a/js/quadrilateral/view/QuadrilateralDiagonalGuidesNode.ts (revision 20d382c13b5e32bc0384335703d9682275f10e9a) +++ b/js/quadrilateral/view/QuadrilateralDiagonalGuidesNode.ts (date 1675122573620) @@ -28,7 +28,7 @@ class QuadrilateralDiagonalGuidesNode extends Node { public constructor( quadrilateralShapeModel: QuadrilateralShapeModel, - boundsProperty: TReadOnlyProperty, + bounds: Bounds2, visibleProperty: TReadOnlyProperty, modelViewTransform: ModelViewTransform2 ) { @@ -44,18 +44,18 @@ visibleProperty.link( visible => { this.visible = visible; } ); Multilink.multilink( - [ quadrilateralShapeModel.vertexA.positionProperty, quadrilateralShapeModel.vertexC.positionProperty, boundsProperty ], - ( vertexAPosition, vertexCPosition, bounds ) => { - assert && assert( vertexAPosition && vertexCPosition && bounds, 'positions need to be defined for diagonal guides' ); - QuadrilateralDiagonalGuidesNode.drawDiagonal( vertexAPosition, vertexCPosition, bounds!, modelViewTransform, lineNode1 ); + [ quadrilateralShapeModel.vertexA.positionProperty, quadrilateralShapeModel.vertexC.positionProperty ], + ( vertexAPosition, vertexCPosition ) => { + assert && assert( vertexAPosition && vertexCPosition, 'positions need to be defined for diagonal guides' ); + QuadrilateralDiagonalGuidesNode.drawDiagonal( vertexAPosition, vertexCPosition, bounds, modelViewTransform, lineNode1 ); } ); Multilink.multilink( - [ quadrilateralShapeModel.vertexB.positionProperty, quadrilateralShapeModel.vertexD.positionProperty, boundsProperty ], - ( vertexBPosition, vertexDPosition, bounds ) => { - assert && assert( vertexBPosition && vertexDPosition && bounds, 'positions need to be defined for diagonal guides' ); - QuadrilateralDiagonalGuidesNode.drawDiagonal( vertexBPosition, vertexDPosition, bounds!, modelViewTransform, lineNode2 ); + [ quadrilateralShapeModel.vertexB.positionProperty, quadrilateralShapeModel.vertexD.positionProperty ], + ( vertexBPosition, vertexDPosition ) => { + assert && assert( vertexBPosition && vertexDPosition, 'positions need to be defined for diagonal guides' ); + QuadrilateralDiagonalGuidesNode.drawDiagonal( vertexBPosition, vertexDPosition, bounds, modelViewTransform, lineNode2 ); } ); } Index: js/quadrilateral/view/QuadrilateralScreenView.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/js/quadrilateral/view/QuadrilateralScreenView.ts b/js/quadrilateral/view/QuadrilateralScreenView.ts --- a/js/quadrilateral/view/QuadrilateralScreenView.ts (revision 20d382c13b5e32bc0384335703d9682275f10e9a) +++ b/js/quadrilateral/view/QuadrilateralScreenView.ts (date 1675123232701) @@ -35,11 +35,11 @@ import QuadrilateralInteractionCueNode from './QuadrilateralInteractionCueNode.js'; import ResetShapeButton from './ResetShapeButton.js'; import ShapeSoundCheckbox from './ShapeSoundCheckbox.js'; -import Vertex from '../model/Vertex.js'; import Vector2 from '../../../../dot/js/Vector2.js'; import SmallStepsLockToggleButton from './SmallStepsLockToggleButton.js'; import QuadrilateralColors from '../../common/QuadrilateralColors.js'; import QuadrilateralSerialConnectionButton from './QuadrilateralSerialConnectionButton.js'; +import Vertex from '../model/Vertex.js'; // Defines the units of model space, a 2x2 grid that quadrilateral vertices can move within. It is dilated by // half of the vertex width so that model space is large enough for Vertices to perfectly align with the bounds @@ -128,6 +128,9 @@ reducedViewBounds.centerY + largestDimension / 2 ); + // todo: For next time, come back here. Bounds are correct, but we need square bounds for the mvt + console.log( model.modelBounds ); + console.log( MODEL_BOUNDS ); const modelViewTransform = ModelViewTransform2.createRectangleInvertedYMapping( MODEL_BOUNDS, viewBoundsForTransform @@ -136,22 +139,6 @@ this.model = model; this.modelViewTransform = modelViewTransform; - // The available model bounds are determined by the size of the view - const availableModelBounds = this.modelViewTransform.viewToModelBounds( reducedViewBounds ); - - // Makes the grid displaying model bounds look nice by making the remaining width/height beyond GRID_SPACING equal - const remainingWidth = ( availableModelBounds.width / 2 ) % QuadrilateralConstants.GRID_SPACING; - const remainingHeight = ( availableModelBounds.height / 2 ) % QuadrilateralConstants.GRID_SPACING; - if ( remainingWidth > remainingHeight ) { - availableModelBounds.erodeX( remainingWidth - remainingHeight ); - } - else if ( remainingHeight > remainingWidth ) { - availableModelBounds.erodeY( remainingHeight - remainingWidth ); - } - - // so that the remaining bounds of the - model.modelBoundsProperty.value = availableModelBounds; - const shapeModel = model.quadrilateralShapeModel; const tangibleConnectionModel = model.tangibleConnectionModel; @@ -159,7 +146,7 @@ this.quadrilateralSoundView = null; // Layered under everything else - const diagonalGuidesNode = new QuadrilateralDiagonalGuidesNode( model.quadrilateralShapeModel, model.modelBoundsProperty, model.diagonalGuidesVisibleProperty, this.modelViewTransform ); + const diagonalGuidesNode = new QuadrilateralDiagonalGuidesNode( model.quadrilateralShapeModel, model.modelBounds, model.diagonalGuidesVisibleProperty, this.modelViewTransform ); this.quadrilateralNode = new QuadrilateralNode( model, modelViewTransform, this.layoutBounds, this.quadrilateralDescriber, { tandem: tandem.createTandem( 'quadrilateralNode' ) @@ -169,7 +156,7 @@ this.quadrilateralSoundView = new QuadrilateralSoundView( model, preferencesModel.soundOptionsModel ); - const gridNode = new QuadrilateralGridNode( model.modelBoundsProperty, model.gridVisibleProperty, this.modelViewTransform ); + const gridNode = new QuadrilateralGridNode( model.modelBounds, model.gridVisibleProperty, this.modelViewTransform ); // rendering order - See https://github.com/phetsims/quadrilateral/issues/178 // this.addChild( boundsRectangle ); Index: js/quadrilateral/model/QuadrilateralShapeModel.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/js/quadrilateral/model/QuadrilateralShapeModel.ts b/js/quadrilateral/model/QuadrilateralShapeModel.ts --- a/js/quadrilateral/model/QuadrilateralShapeModel.ts (revision 20d382c13b5e32bc0384335703d9682275f10e9a) +++ b/js/quadrilateral/model/QuadrilateralShapeModel.ts (date 1675122946502) @@ -369,12 +369,6 @@ this.saveSideLengths(); - model.modelBoundsProperty.link( modelBounds => { - if ( modelBounds ) { - this.setVertexDragAreas(); - } - } ); - Multilink.multilink( [ this.vertexA.positionProperty, this.vertexB.positionProperty, @@ -390,9 +384,7 @@ this.shapeChangedEmitter.emit(); - if ( model.modelBoundsProperty.value ) { - this.setVertexDragAreas(); - } + this.setVertexDragAreas(); } ); @@ -400,16 +392,12 @@ this.makeAdjacentSidesNonInteractiveWhenPressed( this.topSide, this.bottomSide, this.leftSide, this.rightSide ); this.makeAdjacentSidesNonInteractiveWhenPressed( this.leftSide, this.rightSide, this.topSide, this.bottomSide ); - // TODO: If modelBounds is not observable, this could just be a link instead of a multilink this.vertices.forEach( vertex => { - Multilink.multilink( [ vertex.modelBoundsProperty, model.modelBoundsProperty ], ( vertexBounds, modelBounds ) => { - if ( modelBounds ) { - - vertex.topConstrainedProperty.value = Utils.equalsEpsilon( vertexBounds.maxY, modelBounds.maxY, 0.01 ); - vertex.rightConstrainedProperty.value = Utils.equalsEpsilon( vertexBounds.maxX, modelBounds.maxX, 0.01 ); - vertex.bottomConstrainedProperty.value = Utils.equalsEpsilon( vertexBounds.minY, modelBounds.minY, 0.01 ); - vertex.leftConstrainedProperty.value = Utils.equalsEpsilon( vertexBounds.minX, modelBounds.minX, 0.01 ); - } + vertex.modelBoundsProperty.link( vertexBounds => { + vertex.topConstrainedProperty.value = Utils.equalsEpsilon( vertexBounds.maxY, model.modelBounds.maxY, 0.01 ); + vertex.rightConstrainedProperty.value = Utils.equalsEpsilon( vertexBounds.maxX, model.modelBounds.maxX, 0.01 ); + vertex.bottomConstrainedProperty.value = Utils.equalsEpsilon( vertexBounds.minY, model.modelBounds.minY, 0.01 ); + vertex.leftConstrainedProperty.value = Utils.equalsEpsilon( vertexBounds.minX, model.modelBounds.minX, 0.01 ); } ); } ); } @@ -460,6 +448,8 @@ /** * Save the current set of vertex angles to this.savedVertexAngles. + * + * TODO: Can this be removed? */ private saveVertexAngles(): void { this.savedVertexAngles = this.getVertexAngles(); @@ -752,8 +742,7 @@ const testVertex = this.vertices[ i ]; // The vertex must be completely within model bounds - assert && assert( this.model.modelBoundsProperty.value, 'Model bounds must be defined.' ); - shapeAllowed = this.model.modelBoundsProperty.value!.containsBounds( testVertex.modelBoundsProperty.value ); + shapeAllowed = this.model.modelBounds.containsBounds( testVertex.modelBoundsProperty.value ); // Make sure that no vertices overlap any other (only need to do this if we haven't already found // a disallowed case. @@ -1173,7 +1162,7 @@ const tangibleConnectionModel = this.model.tangibleConnectionModel; // you must calibrate before setting positions from a physical device - if ( tangibleConnectionModel.physicalToVirtualTransform !== null && !tangibleConnectionModel.isCalibratingProperty.value && this.model.modelBoundsProperty.value ) { + if ( tangibleConnectionModel.physicalToVirtualTransform !== null && !tangibleConnectionModel.isCalibratingProperty.value ) { // scale the physical positions to the simulation virtual model const scaledProposedPositions: VertexWithProposedPosition[] = proposedPositions.map( vertexWithProposedPosition => { @@ -1192,7 +1181,7 @@ constrainedPosition = vertexWithProposedPosition.vertex.smoothPosition( virtualPosition ); // constrain within model bounds - constrainedPosition = this.model.modelBoundsProperty.value!.closestPointTo( constrainedPosition ); + constrainedPosition = this.model.modelBounds.closestPointTo( constrainedPosition ); } else { @@ -1313,12 +1302,12 @@ const tangibleConnectionModel = this.model.tangibleConnectionModel; // you must calibrate before setting positions from a physical device - if ( tangibleConnectionModel.physicalModelBoundsProperty.value !== null && !tangibleConnectionModel.isCalibratingProperty.value && this.model.modelBoundsProperty.value ) { + if ( tangibleConnectionModel.physicalModelBoundsProperty.value !== null && !tangibleConnectionModel.isCalibratingProperty.value ) { // the physical device lengths can only become half as long as the largest length, so map to the sim model // with that constraint as well so that the smallest shape on the physical device doesn't bring vertices // all the way to the center of the screen (0, 0). - const deviceLengthToSimLength = new LinearFunction( 0, tangibleConnectionModel.physicalModelBoundsProperty.value.width, 0, this.model.modelBoundsProperty.value.width / 3 ); + const deviceLengthToSimLength = new LinearFunction( 0, tangibleConnectionModel.physicalModelBoundsProperty.value.width, 0, this.model.modelBounds.width / 3 ); const mappedTopLength = deviceLengthToSimLength.evaluate( topLength ); const mappedRightLength = deviceLengthToSimLength.evaluate( rightLength ); @@ -1341,9 +1330,7 @@ * @param p2Angle - the right top angle (vertexB) */ public setPositionsFromLengthsAndAngles( topLength: number, rightLength: number, leftLength: number, p1Angle: number, p2Angle: number ): void { - - assert && assert( this.model.modelBoundsProperty.value, 'setPositionsFromLengthsAndAngles can only be used when modelBounds are defined' ); - const modelBounds = this.model.modelBoundsProperty.value!; + const modelBounds = this.model.modelBounds; // vertexA and the topLine are anchored, the rest of the shape is relative to this const vector1Position = new Vector2( modelBounds.minX, modelBounds.maxX ); @@ -1370,7 +1357,7 @@ const rotatedPositions = _.map( shiftedPositions, shiftedPosition => shiftedPosition.rotated( -rotationProperty.value ) ); // make sure that all positions are within model bounds - const constrainedPositions = _.map( rotatedPositions, position => this.model.modelBoundsProperty.value?.closestPointTo( position ) ); + const constrainedPositions = _.map( rotatedPositions, position => this.model.modelBounds.closestPointTo( position ) ); // smooth positions to try to reduce noise // TODO: Should this go before or after constraining to the grid? @@ -1408,7 +1395,9 @@ * Update the drag areas for all vertices. */ private setVertexDragAreas(): void { - const dilatedBounds = this.model.modelBoundsProperty.value!.dilated( 1 ); + + // TODO: What is this dilation and value?? + const dilatedBounds = this.model.modelBounds.dilated( 1 ); this.vertexA.dragAreaProperty.set( this.createVertexArea( dilatedBounds, this.vertexA, this.vertexB, this.vertexC, this.vertexD ) ); this.vertexB.dragAreaProperty.set( this.createVertexArea( dilatedBounds, this.vertexB, this.vertexC, this.vertexD, this.vertexA ) ); Index: js/quadrilateral/model/prototype/TangibleConnectionModel.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/js/quadrilateral/model/prototype/TangibleConnectionModel.ts b/js/quadrilateral/model/prototype/TangibleConnectionModel.ts --- a/js/quadrilateral/model/prototype/TangibleConnectionModel.ts (revision 20d382c13b5e32bc0384335703d9682275f10e9a) +++ b/js/quadrilateral/model/prototype/TangibleConnectionModel.ts (date 1675122293541) @@ -53,9 +53,9 @@ // The bounds of simulation model space. Used to create transforms between physical device units and simulation // model space. - private readonly modelBoundsProperty: TProperty; + private readonly modelBounds: Bounds2; - public constructor( modelBoundsProperty: TProperty, tandem: Tandem ) { + public constructor( modelBounds: Bounds2, tandem: Tandem ) { this.connectedToDeviceProperty = new BooleanProperty( false, { tandem: tandem.createTandem( 'connectedToDeviceProperty' ) @@ -72,7 +72,7 @@ this.markerDetectionModel = new MarkerDetectionModel( tandem.createTandem( 'markerDetectionModel' ) ); - this.modelBoundsProperty = modelBoundsProperty; + this.modelBounds = modelBounds; } /** @@ -104,7 +104,7 @@ this.physicalToVirtualTransform = ModelViewTransform2.createSinglePointScaleMapping( new Vector2( width / 2, height / 2 ), // center of the physical space "model" new Vector2( 0, 0 ), // origin of the simulation model - this.modelBoundsProperty.value!.height / ( height ) // scale from physical model to simulation space + this.modelBounds.height / ( height ) // scale from physical model to simulation space ); } } Index: js/quadrilateral/model/QuadrilateralModel.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/js/quadrilateral/model/QuadrilateralModel.ts b/js/quadrilateral/model/QuadrilateralModel.ts --- a/js/quadrilateral/model/QuadrilateralModel.ts (revision 20d382c13b5e32bc0384335703d9682275f10e9a) +++ b/js/quadrilateral/model/QuadrilateralModel.ts (date 1675122256469) @@ -29,9 +29,14 @@ class QuadrilateralModel { - // The bounds in model space. The bounds will change depending on available screen bounds so that - // on larger screens there is more model space to explore diferent shapes. - public modelBoundsProperty: Property; + // The bounds of the simulation in model coordinates. Origin (0,0) is at the center. The shape and + // vertices can be positioned within these bounds. + public modelBounds = new Bounds2( + -QuadrilateralConstants.BOUNDS_WIDTH / 2, + -QuadrilateralConstants.BOUNDS_HEIGHT / 2, + QuadrilateralConstants.BOUNDS_WIDTH / 2, + QuadrilateralConstants.BOUNDS_HEIGHT / 2 + ); // Whether a reset is currently in progress. Added for sound. If the model is actively resetting, // SoundManagers will disable so we don't play sounds for transient model states. It is a value for when @@ -58,7 +63,7 @@ // The available bounds for smooth vertex dragging (the model bounds eroded by the width of a vertex so a vertex // can never go ouside of the model bounds. - public readonly vertexDragBoundsProperty: TReadOnlyProperty; + public readonly vertexDragBounds = this.modelBounds.eroded( Vertex.VERTEX_WIDTH / 2 ); // Whether vertices are going to snap to the minor intervals of the model grid. The user can "lock" this setting // from the user interface. There is also a global hotkey to toggle this quickly during interaction. @@ -105,23 +110,7 @@ this.preferencesModel = preferencesModel; - this.modelBoundsProperty = new Property( null, { - tandem: tandem.createTandem( 'modelBoundsProperty' ), - phetioValueType: NullableIO( Bounds2.Bounds2IO ) - } ); - - this.tangibleConnectionModel = new TangibleConnectionModel( this.modelBoundsProperty, tandem.createTandem( 'tangibleConnectionModel' ) ); - - this.vertexDragBoundsProperty = new DerivedProperty( [ this.modelBoundsProperty ], ( bounds: Bounds2 | null ) => { - if ( bounds ) { - return bounds.eroded( Vertex.VERTEX_WIDTH / 2 ); - } - else { - - // can drag anywhere until model bounds are initialiized - return Bounds2.EVERYTHING; - } - } ); + this.tangibleConnectionModel = new TangibleConnectionModel( this.modelBounds, tandem.createTandem( 'tangibleConnectionModel' ) ); this.showDebugValuesProperty = new BooleanProperty( QuadrilateralQueryParameters.showModelValues ); ```
jessegreenberg commented 1 year ago

Done in the above commit, modelBoundsProperty is no longer a Property.