import '../../globals.js';
import { Rectangle } from '../../scenery/js/imports.js';
import bamboo from './bamboo.js';
class ChartRectangle extends Rectangle {
    constructor(chartTransform, options) {
        super(0, 0, 0, 0, options);
        this.chartTransform = chartTransform;
        // Initialize
        this.update();
        // Update when the transform changes.
        const changedListener = () => this.update();
        chartTransform.changedEmitter.addListener(changedListener);
        this.disposeChartRectangle = () => chartTransform.changedEmitter.removeListener(changedListener);
    }
    update() {
        this.setRect(0, 0, this.chartTransform.viewWidth, this.chartTransform.viewHeight);
    }
    dispose() {
        this.disposeChartRectangle();
        super.dispose();
    }
}
bamboo.register('ChartRectangle', ChartRectangle);
export default ChartRectangle;
//# sourceMappingURL=ChartRectangle.js.map