revert: "refactor: Remove block and workspace drag surfaces (#6758)" (#6888)

This reverts commit 332c0fd2f2.
This commit is contained in:
Maribeth Bottorff
2023-03-09 13:43:12 -08:00
committed by GitHub
parent c0934216f8
commit cdb1215d95
15 changed files with 791 additions and 30 deletions

View File

@@ -713,6 +713,11 @@ export class Scrollbar {
// Look up the current translation and record it.
this.startDragHandle = this.handlePosition;
// Tell the workspace to setup its drag surface since it is about to move.
// onMouseMoveHandle will call onScroll which actually tells the workspace
// to move.
this.workspace.setupDragSurface();
// Record the current mouse position.
this.startDragMouse = this.horizontal ? e.clientX : e.clientY;
this.onMouseUpWrapper_ = browserEvents.conditionalBind(
@@ -739,6 +744,8 @@ export class Scrollbar {
/** Release the scrollbar handle and reset state accordingly. */
private onMouseUpHandle() {
// Tell the workspace to clean up now that the workspace is done moving.
this.workspace.resetDragSurface();
Touch.clearTouchIdentifier();
this.cleanUp();
}