Skip to content

Commit 94e345e

Browse files
committed
remove update_external_block
1 parent e42b75c commit 94e345e

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

canvas/src/engine/index.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff 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,

canvas/src/store/blocks.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,12 @@ export const updateNodeData = <K extends BlockValues>(
3333

3434
/** Sync the block data from the engine. */
3535
export 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
})

machine/src/blocks/block.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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
},

0 commit comments

Comments
 (0)