File tree Expand file tree Collapse file tree 3 files changed +3
-10
lines changed
Expand file tree Collapse file tree 3 files changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -413,12 +413,9 @@ export class CanvasEngine {
413413 if ( ! node ) return
414414
415415 const data = { ...node . data , ...config } as BaseBlockFieldOf < T >
416-
417416 updateNodeData ( id , data )
418417
419- if ( isExternalBlock ( type ) ) {
420- engine . ctx . update_external_block ( id , encodeMsgpack ( data ) )
421- } else {
418+ if ( ! isExternalBlock ( type ) ) {
422419 engine . ctx . update_built_in_block ( id , {
423420 ...data ,
424421 type,
Original file line number Diff line number Diff line change @@ -33,17 +33,12 @@ export const updateNodeData = <K extends BlockValues>(
3333
3434/** Sync the block data from the engine. */
3535export const syncBlockData = ( block : { id : number ; data : BlockDataByType } ) => {
36- console . log ( "syncBlockData" , block . data )
37-
3836 updateNode ( block . id , ( node ) => {
3937 const type = node . type
4038
4139 if ( type ) {
4240 if ( block . data . type === "BuiltIn" ) {
4341 node . data = { ...node . data , ...block . data . data }
44- } else {
45- console . log ( "external block" , block )
46- // node.data = { ...node.data, ...block.data.data }
4742 }
4843 }
4944 } )
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ pub enum BlockDataByType {
3131 /// Unique identifier of the external block.
3232 name : String ,
3333
34- /// Data is stored in the MessagePack value format.
34+ /// Shared data is stored in the MessagePack value format.
35+ /// Optional. You can rely on message passing and not share data.
3536 #[ serde( with = "serde_bytes" ) ]
3637 data : Vec < u8 > ,
3738 } ,
You can’t perform that action at this time.
0 commit comments