Skip to content

Commit 11b7b72

Browse files
Merge pull request #7377 from google/rc/v10.1.1
release: v10.1.1
2 parents 8cbc7ed + b17f5ac commit 11b7b72

File tree

5 files changed

+10
-11
lines changed

5 files changed

+10
-11
lines changed

core/flyout_horizontal.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import type {FlyoutButton} from './flyout_button.js';
1919
import type {Options} from './options.js';
2020
import * as registry from './registry.js';
2121
import {Scrollbar} from './scrollbar.js';
22-
import {Coordinate} from './utils/coordinate.js';
22+
import type {Coordinate} from './utils/coordinate.js';
2323
import {Rect} from './utils/rect.js';
2424
import * as toolbox from './utils/toolbox.js';
2525
import * as WidgetDiv from './widgetdiv.js';
@@ -285,8 +285,7 @@ export class HorizontalFlyout extends Flyout {
285285
} else {
286286
moveX = cursorX - tab;
287287
}
288-
// No 'reason' provided since events are disabled.
289-
block!.moveTo(new Coordinate(moveX, cursorY));
288+
block!.moveBy(moveX, cursorY);
290289

291290
const rect = this.createRect_(block!, moveX, cursorY, blockHW, i);
292291
cursorX += blockHW.width + gaps[i];

core/flyout_vertical.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import type {FlyoutButton} from './flyout_button.js';
1919
import type {Options} from './options.js';
2020
import * as registry from './registry.js';
2121
import {Scrollbar} from './scrollbar.js';
22-
import {Coordinate} from './utils/coordinate.js';
22+
import type {Coordinate} from './utils/coordinate.js';
2323
import {Rect} from './utils/rect.js';
2424
import * as toolbox from './utils/toolbox.js';
2525
import * as WidgetDiv from './widgetdiv.js';
@@ -246,8 +246,7 @@ export class VerticalFlyout extends Flyout {
246246
const moveX = block!.outputConnection
247247
? cursorX - this.tabWidth_
248248
: cursorX;
249-
// No 'reason' provided since events are disabled.
250-
block!.moveTo(new Coordinate(moveX, cursorY));
249+
block!.moveBy(moveX, cursorY);
251250

252251
const rect = this.createRect_(
253252
block!,
@@ -358,8 +357,7 @@ export class VerticalFlyout extends Flyout {
358357
if (!block.outputConnection) {
359358
newX -= this.tabWidth_;
360359
}
361-
// No 'reason' provided since events are disabled.
362-
block.moveTo(new Coordinate(newX - oldX, 0));
360+
block.moveBy(newX - oldX, 0);
363361
}
364362
if (this.rectMap_.has(block)) {
365363
this.moveRectToBlock_(this.rectMap_.get(block)!, block);

core/utils/toolbox.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ export interface BlockInfo {
2424
disabled?: string | boolean;
2525
enabled?: boolean;
2626
id?: string;
27+
x?: number;
28+
y?: number;
2729
collapsed?: boolean;
2830
inline?: boolean;
2931
data?: string;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

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

0 commit comments

Comments
 (0)