release: v9.3.3

Merge pull request #7016 from google/rc/v9.3.3
This commit is contained in:
Beka Westberg
2023-04-26 09:35:15 -07:00
committed by GitHub
4 changed files with 23 additions and 6 deletions

View File

@@ -179,18 +179,18 @@ 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());
const rootBlock = this.topBlock.getRootBlock();
// bringToFront is incredibly expensive. Delay by at least a frame.
requestAnimationFrame(() => {
blockAnimations.connectionUiEffect(inferiorConnection.getSourceBlock());
setTimeout(() => {
rootBlock.bringToFront();
}, 0);

View File

@@ -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);
}
}

4
package-lock.json generated
View File

@@ -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": {

View File

@@ -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"