fix: flyout id is different than first placed block (#7618)

* add saveIds param and logic to save correctly

* remove whitespace

* add saveIds to recursive calls

* run format

* change name from addIds to saveIds

* add saveIds test

* change blockId on false saveIds to undefined
This commit is contained in:
Trey Pisano
2023-11-01 11:52:27 -04:00
committed by GitHub
parent 666a393ac5
commit 73841995ec
3 changed files with 28 additions and 6 deletions

View File

@@ -61,6 +61,12 @@ suite('JSO Serialization', function () {
assertProperty(jso, 'id', 'id0');
});
test('saveId false', function () {
const block = this.workspace.newBlock('row_block');
const jso = Blockly.serialization.blocks.save(block, {saveIds: false});
assertProperty(jso, 'id', undefined);
});
suite('Attributes', function () {
suite('Collapsed', function () {
test('True', function () {