Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: delete drag stack #7994

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion core/blockly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,6 @@ export const setParentContainer = common.setParentContainer;

// Aliases to allow external code to access these values for legacy reasons.
export const COLLAPSE_CHARS = internalConstants.COLLAPSE_CHARS;
export const DRAG_STACK = internalConstants.DRAG_STACK;
export const OPPOSITE_TYPE = internalConstants.OPPOSITE_TYPE;
export const RENAME_VARIABLE_ID = internalConstants.RENAME_VARIABLE_ID;
export const DELETE_VARIABLE_ID = internalConstants.DELETE_VARIABLE_ID;
Expand Down
9 changes: 0 additions & 9 deletions core/gesture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import type {Field} from './field.js';
import type {IBlockDragger} from './interfaces/i_block_dragger.js';
import type {IBubble} from './interfaces/i_bubble.js';
import type {IFlyout} from './interfaces/i_flyout.js';
import * as internalConstants from './internal_constants.js';
import * as Tooltip from './tooltip.js';
import * as Touch from './touch.js';
import {Coordinate} from './utils/coordinate.js';
Expand Down Expand Up @@ -142,7 +141,6 @@ export class Gesture {

/** Boolean used internally to break a cycle in disposal. */
protected isEnding_ = false;
private healStack: boolean;

/** The event that most recently updated this gesture. */
private mostRecentEvent: PointerEvent;
Expand Down Expand Up @@ -191,12 +189,6 @@ export class Gesture {
* (0, 0) is at this.mouseDownXY_.
*/
this.currentDragDeltaXY = new Coordinate(0, 0);

/**
* Boolean used to indicate whether or not to heal the stack after
* disconnecting a block.
*/
this.healStack = !internalConstants.DRAG_STACK;
}

/**
Expand Down Expand Up @@ -431,7 +423,6 @@ export class Gesture {
}

this.mouseDownXY = new Coordinate(e.clientX, e.clientY);
this.healStack = e.altKey || e.ctrlKey || e.metaKey;

this.bindMouseEvents(e);

Expand Down
8 changes: 0 additions & 8 deletions core/internal_constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ import {ConnectionType} from './connection_type.js';
*/
export const COLLAPSE_CHARS = 30;

/**
* When dragging a block out of a stack, split the stack in two (true), or drag
* out the block healing the stack (false).
*
* @internal
*/
export const DRAG_STACK = true;

/**
* Lookup table for determining the opposite type of a connection.
*
Expand Down
Loading