Skip to content

Commit

Permalink
Fix redundant insertion marker after dragging
Browse files Browse the repository at this point in the history
Signed-off-by: Songlin Jiang <songlin.jiang@csc.fi>
  • Loading branch information
HollowMan6 committed Jul 28, 2023
1 parent 48224cc commit f148ffb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/multiselect_block_dragger.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ export class MultiselectBlockDragger extends Blockly.BlockDragger {
this.blockSelection = blockSelectionWeakMap.get(workspace);
}

/**
* Dispose of this block dragger.
*/
dispose() {
super.dispose();
this.blockDraggers_.forEach((blockDragger) => {
blockDragger.dispose();
});
}

/**
* Prepares the block dragger for a new drag.
* @param {!Blockly.utils.Coordinate} currentDragDeltaXY How far the pointer
Expand Down Expand Up @@ -180,7 +190,7 @@ export class MultiselectBlockDragger extends Blockly.BlockDragger {
*/
this.draggingBlock_.getDescendants(false).forEach(function(block) {
if (!block.getChildren().length) {
block.render();
block.queueRender();
}
});

Expand Down

0 comments on commit f148ffb

Please sign in to comment.