mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
This reverts commit dbe926db4a.
The reverted commit made it so that RTL flyouts were rendered incorrectly.
This commit is contained in:
@@ -19,7 +19,7 @@ import type {FlyoutButton} from './flyout_button.js';
|
|||||||
import type {Options} from './options.js';
|
import type {Options} from './options.js';
|
||||||
import * as registry from './registry.js';
|
import * as registry from './registry.js';
|
||||||
import {Scrollbar} from './scrollbar.js';
|
import {Scrollbar} from './scrollbar.js';
|
||||||
import {Coordinate} from './utils/coordinate.js';
|
import type {Coordinate} from './utils/coordinate.js';
|
||||||
import {Rect} from './utils/rect.js';
|
import {Rect} from './utils/rect.js';
|
||||||
import * as toolbox from './utils/toolbox.js';
|
import * as toolbox from './utils/toolbox.js';
|
||||||
import * as WidgetDiv from './widgetdiv.js';
|
import * as WidgetDiv from './widgetdiv.js';
|
||||||
@@ -285,8 +285,7 @@ export class HorizontalFlyout extends Flyout {
|
|||||||
} else {
|
} else {
|
||||||
moveX = cursorX - tab;
|
moveX = cursorX - tab;
|
||||||
}
|
}
|
||||||
// No 'reason' provided since events are disabled.
|
block!.moveBy(moveX, cursorY);
|
||||||
block!.moveTo(new Coordinate(moveX, cursorY));
|
|
||||||
|
|
||||||
const rect = this.createRect_(block!, moveX, cursorY, blockHW, i);
|
const rect = this.createRect_(block!, moveX, cursorY, blockHW, i);
|
||||||
cursorX += blockHW.width + gaps[i];
|
cursorX += blockHW.width + gaps[i];
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import type {FlyoutButton} from './flyout_button.js';
|
|||||||
import type {Options} from './options.js';
|
import type {Options} from './options.js';
|
||||||
import * as registry from './registry.js';
|
import * as registry from './registry.js';
|
||||||
import {Scrollbar} from './scrollbar.js';
|
import {Scrollbar} from './scrollbar.js';
|
||||||
import {Coordinate} from './utils/coordinate.js';
|
import type {Coordinate} from './utils/coordinate.js';
|
||||||
import {Rect} from './utils/rect.js';
|
import {Rect} from './utils/rect.js';
|
||||||
import * as toolbox from './utils/toolbox.js';
|
import * as toolbox from './utils/toolbox.js';
|
||||||
import * as WidgetDiv from './widgetdiv.js';
|
import * as WidgetDiv from './widgetdiv.js';
|
||||||
@@ -246,8 +246,7 @@ export class VerticalFlyout extends Flyout {
|
|||||||
const moveX = block!.outputConnection
|
const moveX = block!.outputConnection
|
||||||
? cursorX - this.tabWidth_
|
? cursorX - this.tabWidth_
|
||||||
: cursorX;
|
: cursorX;
|
||||||
// No 'reason' provided since events are disabled.
|
block!.moveBy(moveX, cursorY);
|
||||||
block!.moveTo(new Coordinate(moveX, cursorY));
|
|
||||||
|
|
||||||
const rect = this.createRect_(
|
const rect = this.createRect_(
|
||||||
block!,
|
block!,
|
||||||
@@ -358,8 +357,7 @@ export class VerticalFlyout extends Flyout {
|
|||||||
if (!block.outputConnection) {
|
if (!block.outputConnection) {
|
||||||
newX -= this.tabWidth_;
|
newX -= this.tabWidth_;
|
||||||
}
|
}
|
||||||
// No 'reason' provided since events are disabled.
|
block.moveBy(newX - oldX, 0);
|
||||||
block.moveTo(new Coordinate(newX - oldX, 0));
|
|
||||||
}
|
}
|
||||||
if (this.rectMap_.has(block)) {
|
if (this.rectMap_.has(block)) {
|
||||||
this.moveRectToBlock_(this.rectMap_.get(block)!, block);
|
this.moveRectToBlock_(this.rectMap_.get(block)!, block);
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ export interface BlockInfo {
|
|||||||
disabled?: string | boolean;
|
disabled?: string | boolean;
|
||||||
enabled?: boolean;
|
enabled?: boolean;
|
||||||
id?: string;
|
id?: string;
|
||||||
|
x?: number;
|
||||||
|
y?: number;
|
||||||
collapsed?: boolean;
|
collapsed?: boolean;
|
||||||
inline?: boolean;
|
inline?: boolean;
|
||||||
data?: string;
|
data?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user