File tree Expand file tree Collapse file tree
editor-packages/editor-canvas/canvas
editor/pages/canvas-server Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -243,6 +243,9 @@ export function Canvas({
243243 node [ "filekey" ] = filekey ;
244244 return (
245245 < LazyFrame key = { node . id } xy = { [ node . x , node . y ] } size = { node } >
246+ { /* 👇 dev only (for performance tracking) 👇 */ }
247+ { /* <div style={{ width: "100%", height: "100%", background: "grey" }} /> */ }
248+ { /* 👆 ----------------------------------- 👆 */ }
246249 { renderItem ( {
247250 node : node as ReflectSceneNode & { filekey : string } ,
248251 zoom, // ? use scaled_zoom ?
Original file line number Diff line number Diff line change 1+ # Canvas Server page to be embeded in iframe of the canvas.
2+
3+ ## Why? - For performance optimization
4+
5+ > e.g.
6+
7+ ``` tsx
8+ function Host() {
9+ // interact with canvas server via window messaging
10+ return <iframe ref = { ref } src = " {HOST}/canvas-server" />;
11+ }
12+ ```
13+
14+ ## Pros
15+
16+ - Performance optimization
17+
18+ ## Cons
19+
20+ - Lack of control
21+ - Complex state management
22+ - Where to handle the computational work? - what data should be transfered?
Original file line number Diff line number Diff line change 1+ import React from "react" ;
2+
3+ export default function CanvasServer ( ) {
4+ return < > </ > ;
5+ }
You can’t perform that action at this time.
0 commit comments