Skip to content

Decide which element is sized: each canvas, or the wrapper #280

Description

@QuentinRoy

Question

Which element actually gets sized: each canvas individually, or the core-owned wrapper as a single drawing surface?

Two shapes:

(a) Per-canvas. Each createStrokeCanvas sizes and positions itself; the wrapper is incidental, a styling boundary only. Closest to today's code.

(b) The wrapper is the drawing surface. The core sizes and positions its own wrapper to cover whatever the drawing needs; canvases simply fill it. One element owns the geometry, the canvases become dumb fillers, and the client-to-local conversions scattered through renderer.ts collapse to a single origin.

Positions going in: the map's owner leans (a); the charting recommendation was (b), on depth grounds — one decision about one element rather than the same decision repeated three times, and a single seam for the coordinate conversion (see the conversion ticket, which is blocked on this one). Neither was settled; that is this ticket's job.

Note what (b) implies for #263: it makes the wrapper a geometry boundary as well as a styling one, which is more than #269 currently conceives of it as. #269 has been told this question is coming.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions