Skip to content
This repository was archived by the owner on Apr 5, 2025. It is now read-only.

Update layout & rendering algorithms for plot

Dmitry Voytsekhovskiy edited this page Feb 28, 2017 · 6 revisions

Plot exposes following methods affecting layout and rendering:

  • updateLayout and requestUpdateLayout update screen positions and sizes of children DOM elements of the plot in accordance with the current screen size of the master plot’s host DIV element and the current visible rectangle in plot coordinates. The requestUpdateLayout is an async version of the method which allows to perform only most recent update, and thus improve interactivity for low-frame rate rendering.

  • requestNextFrame(plot) invalidates the given plot and asynchronously requests rendering for it in current visible rectangle.

  • requestNextFrameOrUpdate() is intended to be called from derived plots. This method efficiently invalidates the plot; * If auto-fit mode is enabled, and bounding box or padding changed, layout update is requested. * Otherwise, next frame is requested.

Clone this wiki locally