Good idea. Pretty sure it won’t break anything in our apps. From: Alex Harui<mailto:[email protected]> Sent: Saturday, March 14, 2020 7:12 AM To: [email protected]<mailto:[email protected]> Subject: Layouts: Changing widthChanged/heightChanged/sizeChanged event rules
Hi, I am wanting to change the way UIBase setWidthAndHeight dispatches its events to cut down on the number of layout passes. Right now, if you change both the width and height of a component, you get 3 events (widthChanged, heightChanged, sizeChanged). I want to change that so that you only get sizeChanged. This change would cause the "meaning" of widthChanged to mean that only the width changed during a resize so you can optimize some of the layout code and similar for heightChanged. And thus, you will only ever get one event out of setWidthAndHeight, it will either be: - "widthChanged" meaning that only the width has changed - "heightChanged" meaning that only the height has changed - "sizeChanged" meaning that both width and height have changed Does anyone know of any code that would break if we made this change? Everywhere I look, code listens to all 3 and does not react differently so sometimes lays out 3 times, often once before the height has changed. Thoughts? -Alex
