mirror of
https://github.com/google/blockly.git
synced 2026-01-08 01:20:12 +01:00
This reverts commit 332c0fd2f2.
This commit is contained in:
committed by
GitHub
parent
c0934216f8
commit
cdb1215d95
@@ -20,6 +20,9 @@ import type {WorkspaceSvg} from './workspace_svg.js';
|
||||
/**
|
||||
* Class for a workspace dragger. It moves the workspace around when it is
|
||||
* being dragged by a mouse or touch.
|
||||
* Note that the workspace itself manages whether or not it has a drag surface
|
||||
* and how to do translations based on that. This simply passes the right
|
||||
* commands based on events.
|
||||
*/
|
||||
export class WorkspaceDragger {
|
||||
private readonly horizontalScrollEnabled_: boolean;
|
||||
@@ -62,6 +65,7 @@ export class WorkspaceDragger {
|
||||
if (common.getSelected()) {
|
||||
common.getSelected()!.unselect();
|
||||
}
|
||||
this.workspace.setupDragSurface();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,6 +78,7 @@ export class WorkspaceDragger {
|
||||
endDrag(currentDragDeltaXY: Coordinate) {
|
||||
// Make sure everything is up to date.
|
||||
this.drag(currentDragDeltaXY);
|
||||
this.workspace.resetDragSurface();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user