phetsims / calculus-grapher

"Calculus Grapher" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
4 stars 4 forks source link

Gets the y coordinate of the top of the top-most ChartRectangle but providing x values #271

Closed veillette closed 1 year ago

veillette commented 1 year ago

I'm not sure how that even works.

  /**
   * Gets the y coordinate of the top of the top-most ChartRectangle.
   */
  private getChartRectanglesTop(): number {
    return this.graphSetNode.x;
  }
veillette commented 1 year ago

console.log tells me that the x and y values are both zero, which explains why it did not affect the layout.

pixelzoom commented 1 year ago

Ha. Yeah, that should be this.graphSetNode.y. It just so happens that (x,y) is (0,0). I'll fix it.

pixelzoom commented 1 year ago

It's also embarrasing that WebStorm has been shouting at me about this, and I've been ignoring it:

screenshot_2404
pixelzoom commented 1 year ago

Fixed in the above commit, closing.