Addepar / ember-charts

https://opensource.addepar.com/ember-charts/
Other
784 stars 131 forks source link

[ADPR-62603] Abort drawChart if layout sets #250

Closed mixonic closed 4 years ago

mixonic commented 4 years ago

See comment in the code. If updateLayout sets an observed renderVar (and schedule a subsequent redraw), then abort the current render steps as we should permit that change to propagate to the DOM before proceeding with later steps which measure the DOM.

In use, the scheduled rerender was causing an infinite loop where a label rotation change scheduled an update, but updateAxes read the DOM before that change was realized, then the rotation change was drawn which caused the axes to read differently and set a padding value which again caused the rotation to change.

This test never recreated the infinite loop, though it is visually similar to the offending chart.

offending chart Screen Shot 2020-05-27 at 1 01 51 PM
chart in added test Screen Shot 2020-05-27 at 1 02 35 PM