mirror of
https://github.com/google/blockly.git
synced 2026-01-09 18:10:08 +01:00
* fix(build): Restore erroneously-deleted filter function This was deleted in PR #7406 as it was mainly being used to filter core/ vs. test/mocha/ deps into separate deps files - but it turns out also to be used for filtering error messages too. Oops. * refactor(tests): Migrate advanced compilation test to ES Modules * refactor(build): Migrate main.js to TypeScript This turns out to be pretty straight forward, even if it would cause crashing if one actually tried to import this module instead of just feeding it to Closure Compiler. * chore(build): Remove goog.declareModuleId calls Replace goog.declareModuleId calls with a comment recording the former module ID for posterity (or at least until we decide how to reformat the renamings file. * chore(tests): Delete closure/goog/* For the moment we still need something to serve as base.js for the benefit of closure-make-deps, so we keep a vestigial base.js around, containing only the @provideGoog declaration. * refactor(build): Remove vestigial base.js By changing slightly the command line arguments to closure-make-deps and closure-calculate-chunks the need to have any base.js is eliminated. * chore: Typo fix for PR #7415
54 lines
1.6 KiB
TypeScript
54 lines
1.6 KiB
TypeScript
/**
|
|
* @license
|
|
* Copyright 2021 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import type {Coordinate} from '../utils/coordinate.js';
|
|
import type {BlockSvg} from '../block_svg.js';
|
|
// Former goog.module ID: Blockly.IBlockDragger
|
|
|
|
/**
|
|
* A block dragger interface.
|
|
*/
|
|
export interface IBlockDragger {
|
|
/**
|
|
* Start dragging a block.
|
|
*
|
|
* @param currentDragDeltaXY How far the pointer has moved from the position
|
|
* at mouse down, in pixel units.
|
|
* @param healStack Whether or not to heal the stack after disconnecting.
|
|
*/
|
|
startDrag(currentDragDeltaXY: Coordinate, healStack: boolean): void;
|
|
|
|
/**
|
|
* Execute a step of block dragging, based on the given event. Update the
|
|
* display accordingly.
|
|
*
|
|
* @param e The most recent move event.
|
|
* @param currentDragDeltaXY How far the pointer has moved from the position
|
|
* at the start of the drag, in pixel units.
|
|
*/
|
|
drag(e: Event, currentDragDeltaXY: Coordinate): void;
|
|
|
|
/**
|
|
* Finish a block drag and put the block back on the workspace.
|
|
*
|
|
* @param e The mouseup/touchend event.
|
|
* @param currentDragDeltaXY How far the pointer has moved from the position
|
|
* at the start of the drag, in pixel units.
|
|
*/
|
|
endDrag(e: Event, currentDragDeltaXY: Coordinate): void;
|
|
|
|
/**
|
|
* Get a list of the insertion markers that currently exist. Drags have 0, 1,
|
|
* or 2 insertion markers.
|
|
*
|
|
* @returns A possibly empty list of insertion marker blocks.
|
|
*/
|
|
getInsertionMarkers(): BlockSvg[];
|
|
|
|
/** Sever all links from this object and do any necessary cleanup. */
|
|
dispose(): void;
|
|
}
|