Skip to content

Add preview controls to resize the sketch canvas #3768

@Geethegreat

Description

@Geethegreat

Increasing Access

Currently, changing canvas size requires editing createCanvas() and restarting the sketch.
For quick visual iteration, this can feel slow especially for beginners and students.
Preview-level controls provide immediate feedback and make experimentation easier.

Feature request details

I’m proposing a small UI improvement to the Preview panel that adds + / − buttons to resize the sketch canvas while it is running.

What the feature does

  • Adds resize controls in the Preview header

  • Resizes the active canvas live using resizeCanvas()

  • Does not reload the sketch

  • Does not modify user code

  • Resize is temporary and resets on re-run

Limitations

  • Resizes width and height equally

  • Applies to the active sketch canvas

  • Desktop preview only for now

I’d love feedback on whether this interaction fits the editor UX and whether resizing should remain temporary or persist across runs before opening a PR.

canvas-resize2.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Awaiting Maintainer ApprovalNeeds review from a maintainer before moving forwardFeature RequestProposal for adding a new functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions