Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions packages/blockly/core/dragging/block_drag_strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ enum MoveMode {
}

export class BlockDragStrategy implements IDragStrategy {
private workspace: WorkspaceSvg;
protected workspace: WorkspaceSvg;

/** The parent block at the start of the drag. */
private startParentConn: RenderedConnection | null = null;
Expand All @@ -75,19 +75,19 @@ export class BlockDragStrategy implements IDragStrategy {
*/
private startChildConn: RenderedConnection | null = null;

private startLoc: Coordinate | null = null;
protected startLoc: Coordinate | null = null;

private connectionCandidate: ConnectionCandidate | null = null;

private connectionPreviewer: IConnectionPreviewer | null = null;
protected connectionPreviewer: IConnectionPreviewer | null = null;

private dragging = false;

/** List of all connections available on the workspace. */
private allConnectionPairs: ConnectionPair[] = [];

/** The current movement mode. */
private moveMode = MoveMode.UNCONSTRAINED;
protected moveMode = MoveMode.UNCONSTRAINED;

/** Used to persist an event group when snapping is done async. */
private originalEventGroup = '';
Expand All @@ -105,7 +105,7 @@ export class BlockDragStrategy implements IDragStrategy {
*/
protected readonly WORKSPACE_MARGIN = 10;

constructor(private block: BlockSvg) {
constructor(protected block: BlockSvg) {
this.workspace = block.workspace;
}

Expand All @@ -127,7 +127,7 @@ export class BlockDragStrategy implements IDragStrategy {
* @param oldBlock The flyout block that was cloned.
* @param newBlock The new block to position.
*/
private positionNewBlock(oldBlock: BlockSvg, newBlock: BlockSvg) {
protected positionNewBlock(oldBlock: BlockSvg, newBlock: BlockSvg) {
const screenCoordinate = svgMath.wsToScreenCoordinates(
oldBlock.workspace,
oldBlock.getRelativeToSurfaceXY(),
Expand Down Expand Up @@ -469,7 +469,7 @@ export class BlockDragStrategy implements IDragStrategy {
* @param healStack Whether or not to heal the stack after disconnecting.
* @returns True to disconnect the block, false otherwise.
*/
private shouldDisconnect(healStack: boolean): boolean {
protected shouldDisconnect(healStack: boolean): boolean {
return !!(
this.block.getParent() ||
(healStack &&
Expand Down
Loading