mirror of
https://github.com/google/blockly.git
synced 2026-01-26 10:10:08 +01:00
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:
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user