Skip to content

Use the new canvas renderer - #239

Merged
dubstar-04 merged 5 commits into
mainfrom
feature/render-client
Apr 19, 2026
Merged

Use the new canvas renderer#239
dubstar-04 merged 5 commits into
mainfrom
feature/render-client

Conversation

@dubstar-04

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Canvas component to use the new renderer provided by @design-core/core, wiring it into the core canvas lifecycle.

Changes:

  • Import CanvasRenderer from @design-core/core.
  • Configure core.canvas to use CanvasRenderer on mount.
  • Re-apply the renderer when the core prop instance changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +29 to 34
// set the renderer
this.props.core.canvas.setRenderer(CanvasRenderer);

// set the paint callback
this.props.core.canvas.setExternalPaintCallbackFunction(this.paint.bind(this))

Comment thread src/js/components/canvas.js Outdated
Comment on lines 50 to 55
if (prevProps.core !== this.props.core) {
prevProps.core.canvas.setCursorCallbackFunction(undefined);
this.props.core.canvas.setRenderer(CanvasRenderer);
this.props.core.canvas.setExternalPaintCallbackFunction(this.paint.bind(this));
this.props.core.canvas.setCursorCallbackFunction(this.boundOnCursorChange);
this.paint();
@dubstar-04
dubstar-04 merged commit 58d6f02 into main Apr 19, 2026
1 check passed
@dubstar-04
dubstar-04 deleted the feature/render-client branch April 19, 2026 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants