-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…7953) * chore(dragging): Rename core/interfaces/i_draggable.ts Rename core/interfaces/i_draggable.ts to core/interfaces/i_draggable.old.ts to make room for new IDraggable. Do not rename actual interface as it's not yet clear that it will be necessary for both to coexist as imports in the same file. * feat(dragging): Introduce new IDraggable interface * feat(dragging): Introduce new IDragger interface --------- Co-authored-by: Beka Westberg <bwestberg@google.com>
- Loading branch information
Showing
12 changed files
with
119 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/** | ||
* @license | ||
* Copyright 2021 Google LLC | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
// Former goog.module ID: Blockly.IDraggable | ||
|
||
import type {IDeletable} from './i_deletable.js'; | ||
|
||
/** | ||
* The interface for an object that can be dragged. | ||
*/ | ||
export interface IDraggable extends IDeletable {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* @license | ||
* Copyright 2024 Google LLC | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import {Coordinate} from '../utils/coordinate'; | ||
|
||
export interface IDragger { | ||
/** | ||
* Handles any drag startup. | ||
* | ||
* @param e PointerEvent that started the drag. | ||
*/ | ||
onDragStart(e: PointerEvent): void; | ||
|
||
/** | ||
* Handles dragging, including calculating where the element should | ||
* actually be moved to. | ||
* | ||
* @param e PointerEvent that continued the drag. | ||
* @param totalDelta The total distance, in pixels, that the mouse | ||
* has moved since the start of the drag. | ||
*/ | ||
onDrag(e: PointerEvent, totalDelta: Coordinate): void; | ||
|
||
/** | ||
* Handles any drag cleanup. | ||
* | ||
* @param e PointerEvent that finished the drag. | ||
* @param totalDelta The total distance, in pixels, that the mouse | ||
* has moved since the start of the drag. | ||
*/ | ||
onDragEnd(e: PointerEvent, totalDelta: Coordinate): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters