mirror of
https://github.com/idrawjs/idraw
synced 2026-05-23 17:48:23 +00:00
fix: fix the issue of ineffective updateElement
This commit is contained in:
parent
d5b79fa8c3
commit
3fdf91a55a
2 changed files with 6 additions and 0 deletions
|
|
@ -31,3 +31,8 @@ const core = new Core(
|
|||
}
|
||||
);
|
||||
core.setData(data);
|
||||
|
||||
const elem1 = core.getData().elements[1];
|
||||
elem1.desc.text = 'Updated';
|
||||
|
||||
core.updateElement(elem1);
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ export function updateElement(
|
|||
resourceChangeUUIDs.push(result);
|
||||
}
|
||||
data.elements[i] = _elem;
|
||||
core.setData(data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue