phetsims / fractions-intro

"Fractions Intro" is an educational simulation in HTML5, by PhET Interactive Simulations.
MIT License
1 stars 3 forks source link

VerticalBarNode's containerRectangle #59

Closed jonathanolson closed 7 years ago

jonathanolson commented 7 years ago

It's constructed as:

var containerRectangle = new Rectangle( {
  rectX: -options.containerWidth / 2,
  rectY: -options.containerHeight / 2,
  rectWidth: options.containerWidth,
  rectHeight: options.containerHeight,
  stroke: containerStroke,
  lineWidth: options.outlineLineWidth
} );

but its rectX and rectY are essentially never used, as it is positioned by using centerX and centerY. Can rectX and rectY be removed?

davisv7 commented 7 years ago

You're right, rectX,Y can be removed without issue. Should I do anything with the center X, Y?

Assigning back to @jonathanolson for review.

jonathanolson commented 7 years ago

Nothing else needed for the positioning, declaring the width/height and positioning by its center works well.