feat!: change gestures to look at selected when dragging (#7991)

* feat: change gestures to look at selected when dragging

* chore: fix tests

* chore: format

* chore: PR comments
This commit is contained in:
Beka Westberg
2024-04-04 15:52:43 +00:00
committed by GitHub
parent e75a4fb1d3
commit ed403d0b77
14 changed files with 88 additions and 200 deletions

View File

@@ -6,12 +6,16 @@
// Former goog.module ID: Blockly.ISelectable
import type {Workspace} from '../workspace.js';
/**
* The interface for an object that is selectable.
*/
export interface ISelectable {
id: string;
workspace: Workspace;
/** Select this. Highlight it visually. */
select(): void;
@@ -23,6 +27,7 @@ export interface ISelectable {
export function isSelectable(obj: Object): obj is ISelectable {
return (
typeof (obj as any).id === 'string' &&
(obj as any).workspace !== undefined &&
(obj as any).select !== undefined &&
(obj as any).unselect !== undefined
);