@peter.prib/renderengine 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/REFERENCE.md +7 -0
- package/dist/renderengine-workspace.umd.js +2455 -2397
- package/dist/renderengine.umd.js +2455 -2397
- package/package.json +1 -1
- package/src/BaseRenderer.js +11 -0
- package/src/CanvasRenderer.js +7 -0
- package/src/SVGRenderer.js +16 -0
- package/src/index.js +2659 -2635
package/REFERENCE.md
CHANGED
|
@@ -27,6 +27,13 @@ const headless = new RenderEngine(null); // test mode — every chart call no-op
|
|
|
27
27
|
a 3D-orbit chart's own drag-to-rotate/wheel-to-zoom takes over instead — see below).
|
|
28
28
|
- Both renderers sit behind one primitive API (`rect`/`circle`/`path`/`text`/`line`/…) — every
|
|
29
29
|
`Chart` subclass is renderer-agnostic, so any `xChart()` call below works unchanged under either.
|
|
30
|
+
- **Size.** The renderer takes the container's size once, when the engine is made. Call
|
|
31
|
+
`engine.fitToContainer()` before drawing in a container that may since have been resized or
|
|
32
|
+
was hidden then (it measured 0×0): it re-measures and resizes the renderer, returning whether
|
|
33
|
+
the size changed, and does nothing while the container is still 0×0. An SVG diagram that set
|
|
34
|
+
its own viewBox keeps it and scales into the new box; a canvas is cleared, so draw after.
|
|
35
|
+
Without it, a drawing made in a narrower or hidden pane stayed that size — clipped, or blank
|
|
36
|
+
until the page was reloaded.
|
|
30
37
|
|
|
31
38
|
## The rendering model (read this before the streaming section)
|
|
32
39
|
|