Skip to content

Commit 399bd65

Browse files
authored
release: v9.3.3
Merge pull request google#7016 from google/rc/v9.3.3
2 parents ec6e951 + e86183e commit 399bd65

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

core/insertion_marker_manager.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -179,18 +179,18 @@ export class InsertionMarkerManager {
179179
*/
180180
applyConnections() {
181181
if (!this.activeCandidate) return;
182-
const {local, closest} = this.activeCandidate;
183-
local.connect(closest);
184182
eventUtils.disable();
185183
this.hidePreview();
186184
eventUtils.enable();
185+
const {local, closest} = this.activeCandidate;
186+
local.connect(closest);
187187
if (this.topBlock.rendered) {
188188
const inferiorConnection = local.isSuperior() ? closest : local;
189-
blockAnimations.connectionUiEffect(inferiorConnection.getSourceBlock());
190189
const rootBlock = this.topBlock.getRootBlock();
191190

192191
// bringToFront is incredibly expensive. Delay by at least a frame.
193192
requestAnimationFrame(() => {
193+
blockAnimations.connectionUiEffect(inferiorConnection.getSourceBlock());
194194
setTimeout(() => {
195195
rootBlock.bringToFront();
196196
}, 0);

core/render_management.ts

+17
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function doRenders() {
5555

5656
renderBlock(block);
5757
updateConnectionLocations(block, block.getRelativeToSurfaceXY());
58+
updateIconLocations(block);
5859
}
5960
for (const workspace of workspaces) {
6061
workspace.resizeContents();
@@ -98,3 +99,19 @@ function updateConnectionLocations(block: BlockSvg, blockOrigin: Coordinate) {
9899
}
99100
}
100101
}
102+
103+
/**
104+
* Updates all icons that are children of the given block with their new
105+
* locations.
106+
*
107+
* @param block The block to update the icon locations of.
108+
*/
109+
function updateIconLocations(block: BlockSvg) {
110+
if (!block.getIcons) return;
111+
for (const icon of block.getIcons()) {
112+
icon.computeIconLocation();
113+
}
114+
for (const child of block.getChildren(false)) {
115+
updateIconLocations(child);
116+
}
117+
}

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "blockly",
3-
"version": "9.3.2",
3+
"version": "9.3.3",
44
"description": "Blockly is a library for building visual programming editors.",
55
"keywords": [
66
"blockly"

0 commit comments

Comments
 (0)