API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classManualCanvasSizing

@codexo/exojs / core / stable

Hands the canvas geometry to whoever is hosting it. Nothing is observed, no CSS is written and no size ever changes on its own. The application starts at the base resolution - the logical coordinate system and the backing store are `width x height` and `width x height x pixelRatio`, the CSS box is left exactly as the page set it - and stays there until the host calls Application.resize, which moves both of them together and still leaves the CSS box alone. The mode for a canvas whose size is decided elsewhere: a framework-managed layout, an editor panel, or a worker-hosted surface whose dimensions arrive over a message channel. Distinct from passing no sizing at all, which is the same starting geometry but with the application owning the CSS box and keeping it at the base resolution.

0
props
2
methods
0
events
Import
import { ManualCanvasSizing } from '@codexo/exojs'

Hands the canvas geometry to whoever is hosting it.

Nothing is observed, no CSS is written and no size ever changes on its own. The application starts at the base resolution - the logical coordinate system and the backing store are `width x height` and `width x height x pixelRatio`, the CSS box is left exactly as the page set it - and stays there until the host calls Application.resize, which moves both of them together and still leaves the CSS box alone.

The mode for a canvas whose size is decided elsewhere: a framework-managed layout, an editor panel, or a worker-hosted surface whose dimensions arrive over a message channel.

Distinct from passing no sizing at all, which is the same starting geometry but with the application owning the CSS box and keeping it at the base resolution.

Constructors1
new(): ManualCanvasSizing
Methods2
Take ownership of context. Called once the surface exists and, for a canvas mounted through canvas.mount, once it is in the document.
detach(): void
Release everything CanvasSizing.attach created - observers, listeners, message channels - and undo any styling the policy applied itself. The CSS box committed through CanvasSizingContext.apply is not one of those: the application clears that on detach. The default implementation does nothing, which is correct for a policy that observes nothing.
Source