mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
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:
@@ -1213,7 +1213,7 @@ export abstract class Flyout extends DeleteArea implements IFlyout {
|
||||
|
||||
// Clone the block.
|
||||
// TODO(#7432): Add a saveIds parameter to `save`.
|
||||
const json = blocks.save(oldBlock) as blocks.State;
|
||||
const json = blocks.save(oldBlock, {saveIds: false}) as blocks.State;
|
||||
// Normallly this resizes leading to weird jumps. Save it for terminateDrag.
|
||||
targetWorkspace.setResizesEnabled(false);
|
||||
const block = blocks.append(json, targetWorkspace) as BlockSvg;
|
||||
|
||||
Reference in New Issue
Block a user