From 961a83f420a91a15529630eb57a76c5eacd64ae4 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Mon, 24 Apr 2023 15:36:13 -0700 Subject: [PATCH 1/4] fix: icons not having their locations updated (#7012) * fix: icons not having their locations updated * chore: fix running headful tests in node (cherry picked from commit 139bc299a061c3d9fc81e8026d929cbe5589bb55) --- core/render_management.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/core/render_management.ts b/core/render_management.ts index 658f0b1d8..b931ab7e5 100644 --- a/core/render_management.ts +++ b/core/render_management.ts @@ -55,6 +55,7 @@ function doRenders() { renderBlock(block); updateConnectionLocations(block, block.getRelativeToSurfaceXY()); + updateIconLocations(block); } for (const workspace of workspaces) { workspace.resizeContents(); @@ -98,3 +99,19 @@ function updateConnectionLocations(block: BlockSvg, blockOrigin: Coordinate) { } } } + +/** + * Updates all icons that are children of the given block with their new + * locations. + * + * @param block The block to update the icon locations of. + */ +function updateIconLocations(block: BlockSvg) { + if (!block.getIcons) return; + for (const icon of block.getIcons()) { + icon.computeIconLocation(); + } + for (const child of block.getChildren(false)) { + updateIconLocations(child); + } +} From f45cd8160e4695c9cf6a948582d1a0ea6c7f15b4 Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Fri, 21 Apr 2023 12:49:02 -0700 Subject: [PATCH 2/4] fix: insertion markers firing move events (#7005) (cherry picked from commit 35276e9468899659cdd76a41bae0b8837b3573b7) --- core/insertion_marker_manager.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/insertion_marker_manager.ts b/core/insertion_marker_manager.ts index 7f53caa0d..30e241de8 100644 --- a/core/insertion_marker_manager.ts +++ b/core/insertion_marker_manager.ts @@ -179,11 +179,11 @@ export class InsertionMarkerManager { */ applyConnections() { if (!this.activeCandidate) return; - const {local, closest} = this.activeCandidate; - local.connect(closest); eventUtils.disable(); this.hidePreview(); eventUtils.enable(); + const {local, closest} = this.activeCandidate; + local.connect(closest); if (this.topBlock.rendered) { const inferiorConnection = local.isSuperior() ? closest : local; blockAnimations.connectionUiEffect(inferiorConnection.getSourceBlock()); From 026e49604417f7ebe13b702bcc1fde4f0320d96c Mon Sep 17 00:00:00 2001 From: Neil Fraser Date: Wed, 12 Apr 2023 19:00:41 +0200 Subject: [PATCH 3/4] fix: offset location of connection ripple (#6973) Resolves issue #6972 (cherry picked from commit 8ade26148cc4a4263df8367c939236a9caa1d54a) --- core/insertion_marker_manager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/insertion_marker_manager.ts b/core/insertion_marker_manager.ts index 30e241de8..54859e3d2 100644 --- a/core/insertion_marker_manager.ts +++ b/core/insertion_marker_manager.ts @@ -186,11 +186,11 @@ export class InsertionMarkerManager { local.connect(closest); if (this.topBlock.rendered) { const inferiorConnection = local.isSuperior() ? closest : local; - blockAnimations.connectionUiEffect(inferiorConnection.getSourceBlock()); const rootBlock = this.topBlock.getRootBlock(); // bringToFront is incredibly expensive. Delay by at least a frame. requestAnimationFrame(() => { + blockAnimations.connectionUiEffect(inferiorConnection.getSourceBlock()); setTimeout(() => { rootBlock.bringToFront(); }, 0); From e86183e6c687f30abe1e0001424b5c49771a88dd Mon Sep 17 00:00:00 2001 From: Beka Westberg Date: Wed, 26 Apr 2023 16:07:28 +0000 Subject: [PATCH 4/4] release: Update version number to 9.3.3 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 518096d91..0b7fcb5b4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "blockly", - "version": "9.3.2", + "version": "9.3.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "blockly", - "version": "9.3.2", + "version": "9.3.3", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { diff --git a/package.json b/package.json index 077724ae4..901b6caac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "blockly", - "version": "9.3.2", + "version": "9.3.3", "description": "Blockly is a library for building visual programming editors.", "keywords": [ "blockly"