From f4594e6b0de8b8256e3786140ad28f79b321cc32 Mon Sep 17 00:00:00 2001 From: Jesse Date: Tue, 21 Mar 2023 14:36:34 -0400 Subject: [PATCH] correct a visibleProperty that was accidentally passed to the wrong Node, see #398 --- js/quadrilateral/view/QuadrilateralVertexNode.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/quadrilateral/view/QuadrilateralVertexNode.ts b/js/quadrilateral/view/QuadrilateralVertexNode.ts index bec862b7..22b5caf7 100644 --- a/js/quadrilateral/view/QuadrilateralVertexNode.ts +++ b/js/quadrilateral/view/QuadrilateralVertexNode.ts @@ -30,7 +30,7 @@ import { VertexLabelToProposedPositionMap } from '../model/QuadrilateralShapeMod const LABEL_TEXT_FONT = new PhetFont( { size: 16, weight: 'bold' } ); type SelfOptions = EmptySelfOptions; -type VertexNodeOptions = SelfOptions & StrictOmit; +type VertexNodeOptions = SelfOptions & StrictOmit; // Reusable map that saves proposed vertex positions, to avoid excessive garbage. const scratchLabelToPositionMap: VertexLabelToProposedPositionMap = new Map(); @@ -42,8 +42,7 @@ export default class QuadrilateralVertexNode extends QuadrilateralMovableNode { public constructor( vertex: QuadrilateralVertex, vertexLabel: TReadOnlyProperty, quadrilateralModel: QuadrilateralModel, vertexDescriber: VertexDescriber, modelViewTransform: ModelViewTransform2, providedOptions?: VertexNodeOptions ) { const options = optionize()( { - grabbedSound: grabHighPitch_mp3, - visibleProperty: quadrilateralModel.visibilityModel.vertexLabelsVisibleProperty + grabbedSound: grabHighPitch_mp3 }, providedOptions ); const viewRadius = modelViewTransform.modelToViewBounds( vertex.modelBoundsProperty.value ).width / 2; @@ -55,6 +54,7 @@ export default class QuadrilateralVertexNode extends QuadrilateralMovableNode { const vertexLabelText = new Text( vertexLabel, { font: LABEL_TEXT_FONT, + visibleProperty: quadrilateralModel.visibilityModel.vertexLabelsVisibleProperty, // i18n maxWidth: 12 // by inspection