Files
blockly/core/interfaces/i_movable.ts
Sampada Bhujel c37f4b8749 feat: Paste block in viewport / near cursor (#7521)
* fix: Paste block in viewport / near cursor

* Fix: formatting fix with prettier

* fix import path for Coordinate

* fix import path for coordinate

* paste so that the block's center is at the viewport center
2023-09-22 15:32:00 -07:00

30 lines
638 B
TypeScript

/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {Coordinate} from '../utils/coordinate.js';
// Former goog.module ID: Blockly.IMovable
/**
* The interface for an object that is movable.
*/
export interface IMovable {
/**
* Get whether this is movable or not.
*
* @returns True if movable.
*/
isMovable(): boolean;
/**
* Return the coordinates of the top-left corner of this movable object
* relative to the drawing surface's origin (0,0), in workspace units.
*
* @returns Object with .x and .y properties.
*/
getRelativeToSurfaceXY(): Coordinate;
}