File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import "./style.css";
99
1010export function Canvas ( {
1111 baseId,
12- contextCanvas = false ,
1312} : CanvasModel ) {
1413 const {
1514 nodeSystem,
@@ -22,20 +21,20 @@ export function Canvas({
2221 const {
2322 removeNode,
2423 } = useNodeSystemContext ( ) ! ;
25-
26- const nodes = nodeSystem [ baseId ] ?. nodes || [ ] ; ;
24+
25+ const nodes = nodeSystem [ baseId ] ?. nodes || [ ] ;
2726
2827 return ( < >
2928 < div className = "canvas" >
3029 < div className = "nodes" >
3130 {
3231 nodes . map ( node => < Node
3332 key = { node . id }
34- showCanvas = { ! contextCanvas }
33+ showCanvas = { true }
3534 node = { {
3635 ...node ,
37- hasNext : ! contextCanvas ,
38- context : ! contextCanvas || node . isBase ? node . context : [
36+ hasNext : false ,
37+ context : node . isBase ? node . context : [
3938 {
4039 id : `${ node . id } :REMOVE` ,
4140 name : "Remove" ,
Original file line number Diff line number Diff line change 2020 gap : 0.75rem ;
2121}
2222
23- .canvas .canvas .canvas {
24- display : none;
25- }
26-
Original file line number Diff line number Diff line change 9090 height : 100% ;
9191}
9292
93+ .canvas .canvas .node-pointer {
94+ display : none;
95+ }
96+
9397.node-wrapper {
9498 position : relative;
9599 width : var (--size );
Original file line number Diff line number Diff line change @@ -39,10 +39,7 @@ export function NodeContext({
3939 {
4040 ( ! isBase && showCanvas ) && ( < >
4141 < Glass className = "context-canvas" >
42- < Canvas
43- baseId = { nodeId }
44- contextCanvas = { true }
45- />
42+ < Canvas baseId = { nodeId } />
4643 </ Glass >
4744 </ > )
4845 }
Original file line number Diff line number Diff line change 11export interface CanvasModel {
22 baseId : string ;
3- contextCanvas ?: boolean ;
43}
You can’t perform that action at this time.
0 commit comments