google / blockly

The web-based visual programming editor.
https://developers.google.com/blockly/
Apache License 2.0
12.52k stars 3.72k forks source link

refactor: use getters for flyout width and height. #8564

Closed gonfunko closed 2 months ago

gonfunko commented 2 months ago

The basics

The details

Proposed Changes

This PR updates the flyout classes to use the pre-existing getWidth() and getHeight() methods instead of directly accessing the corresponding instance variables. This broadly improves code health, and concretely allows subclasses to e.g. enforce a fixed/maximum width or height by overriding the appropriate getter. This is needed by Scratch: https://github.com/gonfunko/scratch-blocks/issues/153