mirror of
https://github.com/google/blockly.git
synced 2026-01-12 19:37:08 +01:00
Merge branch 'goog_module' into events_click
This commit is contained in:
@@ -10,39 +10,39 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.Events.MarkerMove');
|
||||
goog.module('Blockly.Events.MarkerMove');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
goog.require('Blockly.Events');
|
||||
goog.require('Blockly.Events.UiBase');
|
||||
goog.require('Blockly.registry');
|
||||
goog.require('Blockly.utils.object');
|
||||
|
||||
goog.requireType('Blockly.ASTNode');
|
||||
goog.requireType('Blockly.Block');
|
||||
goog.requireType('Blockly.Workspace');
|
||||
const ASTNode = goog.require('Blockly.ASTNode');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const Block = goog.requireType('Blockly.Block');
|
||||
const Events = goog.require('Blockly.Events');
|
||||
const UiBase = goog.require('Blockly.Events.UiBase');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const Workspace = goog.requireType('Blockly.Workspace');
|
||||
const object = goog.require('Blockly.utils.object');
|
||||
const registry = goog.require('Blockly.registry');
|
||||
|
||||
|
||||
/**
|
||||
* Class for a marker move event.
|
||||
* @param {?Blockly.Block=} opt_block The affected block. Null if current node
|
||||
* @param {?Block=} opt_block The affected block. Null if current node
|
||||
* is of type workspace. Undefined for a blank event.
|
||||
* @param {boolean=} isCursor Whether this is a cursor event. Undefined for a
|
||||
* blank event.
|
||||
* @param {?Blockly.ASTNode=} opt_oldNode The old node the marker used to be on.
|
||||
* @param {?ASTNode=} opt_oldNode The old node the marker used to be on.
|
||||
* Undefined for a blank event.
|
||||
* @param {!Blockly.ASTNode=} opt_newNode The new node the marker is now on.
|
||||
* @param {!ASTNode=} opt_newNode The new node the marker is now on.
|
||||
* Undefined for a blank event.
|
||||
* @extends {Blockly.Events.UiBase}
|
||||
* @extends {UiBase}
|
||||
* @constructor
|
||||
*/
|
||||
Blockly.Events.MarkerMove = function(opt_block, isCursor, opt_oldNode,
|
||||
opt_newNode) {
|
||||
var workspaceId = opt_block ? opt_block.workspace.id : undefined;
|
||||
if (opt_newNode && opt_newNode.getType() == Blockly.ASTNode.types.WORKSPACE) {
|
||||
workspaceId =
|
||||
(/** @type {!Blockly.Workspace} */ (opt_newNode.getLocation())).id;
|
||||
const MarkerMove = function(opt_block, isCursor, opt_oldNode, opt_newNode) {
|
||||
let workspaceId = opt_block ? opt_block.workspace.id : undefined;
|
||||
if (opt_newNode && opt_newNode.getType() == ASTNode.types.WORKSPACE) {
|
||||
workspaceId = (/** @type {!Workspace} */ (opt_newNode.getLocation())).id;
|
||||
}
|
||||
Blockly.Events.MarkerMove.superClass_.constructor.call(this, workspaceId);
|
||||
MarkerMove.superClass_.constructor.call(this, workspaceId);
|
||||
|
||||
/**
|
||||
* The workspace identifier for this event.
|
||||
@@ -52,13 +52,13 @@ Blockly.Events.MarkerMove = function(opt_block, isCursor, opt_oldNode,
|
||||
|
||||
/**
|
||||
* The old node the marker used to be on.
|
||||
* @type {?Blockly.ASTNode|undefined}
|
||||
* @type {?ASTNode|undefined}
|
||||
*/
|
||||
this.oldNode = opt_oldNode;
|
||||
|
||||
/**
|
||||
* The new node the marker is now on.
|
||||
* @type {Blockly.ASTNode|undefined}
|
||||
* @type {ASTNode|undefined}
|
||||
*/
|
||||
this.newNode = opt_newNode;
|
||||
|
||||
@@ -68,20 +68,20 @@ Blockly.Events.MarkerMove = function(opt_block, isCursor, opt_oldNode,
|
||||
*/
|
||||
this.isCursor = isCursor;
|
||||
};
|
||||
Blockly.utils.object.inherits(Blockly.Events.MarkerMove, Blockly.Events.UiBase);
|
||||
object.inherits(MarkerMove, UiBase);
|
||||
|
||||
/**
|
||||
* Type of this event.
|
||||
* @type {string}
|
||||
*/
|
||||
Blockly.Events.MarkerMove.prototype.type = Blockly.Events.MARKER_MOVE;
|
||||
MarkerMove.prototype.type = Events.MARKER_MOVE;
|
||||
|
||||
/**
|
||||
* Encode the event as JSON.
|
||||
* @return {!Object} JSON representation.
|
||||
*/
|
||||
Blockly.Events.MarkerMove.prototype.toJson = function() {
|
||||
var json = Blockly.Events.MarkerMove.superClass_.toJson.call(this);
|
||||
MarkerMove.prototype.toJson = function() {
|
||||
const json = MarkerMove.superClass_.toJson.call(this);
|
||||
json['isCursor'] = this.isCursor;
|
||||
json['blockId'] = this.blockId;
|
||||
json['oldNode'] = this.oldNode;
|
||||
@@ -93,13 +93,14 @@ Blockly.Events.MarkerMove.prototype.toJson = function() {
|
||||
* Decode the JSON event.
|
||||
* @param {!Object} json JSON representation.
|
||||
*/
|
||||
Blockly.Events.MarkerMove.prototype.fromJson = function(json) {
|
||||
Blockly.Events.MarkerMove.superClass_.fromJson.call(this, json);
|
||||
MarkerMove.prototype.fromJson = function(json) {
|
||||
MarkerMove.superClass_.fromJson.call(this, json);
|
||||
this.isCursor = json['isCursor'];
|
||||
this.blockId = json['blockId'];
|
||||
this.oldNode = json['oldNode'];
|
||||
this.newNode = json['newNode'];
|
||||
};
|
||||
|
||||
Blockly.registry.register(Blockly.registry.Type.EVENT,
|
||||
Blockly.Events.MARKER_MOVE, Blockly.Events.MarkerMove);
|
||||
registry.register(registry.Type.EVENT, Events.MARKER_MOVE, MarkerMove);
|
||||
|
||||
exports = MarkerMove;
|
||||
|
||||
@@ -10,12 +10,13 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.Events.ToolboxItemSelect');
|
||||
goog.module('Blockly.Events.ToolboxItemSelect');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
goog.require('Blockly.Events');
|
||||
goog.require('Blockly.Events.UiBase');
|
||||
goog.require('Blockly.registry');
|
||||
goog.require('Blockly.utils.object');
|
||||
const Events = goog.require('Blockly.Events');
|
||||
const UiBase = goog.require('Blockly.Events.UiBase');
|
||||
const object = goog.require('Blockly.utils.object');
|
||||
const registry = goog.require('Blockly.registry');
|
||||
|
||||
|
||||
/**
|
||||
@@ -26,13 +27,11 @@ goog.require('Blockly.utils.object');
|
||||
* a blank event.
|
||||
* @param {string=} opt_workspaceId The workspace identifier for this event.
|
||||
* Undefined for a blank event.
|
||||
* @extends {Blockly.Events.UiBase}
|
||||
* @extends {UiBase}
|
||||
* @constructor
|
||||
*/
|
||||
Blockly.Events.ToolboxItemSelect = function(opt_oldItem, opt_newItem,
|
||||
opt_workspaceId) {
|
||||
Blockly.Events.ToolboxItemSelect.superClass_.constructor.call(
|
||||
this, opt_workspaceId);
|
||||
const ToolboxItemSelect = function(opt_oldItem, opt_newItem, opt_workspaceId) {
|
||||
ToolboxItemSelect.superClass_.constructor.call(this, opt_workspaceId);
|
||||
|
||||
/**
|
||||
* The previously selected toolbox item.
|
||||
@@ -46,20 +45,20 @@ Blockly.Events.ToolboxItemSelect = function(opt_oldItem, opt_newItem,
|
||||
*/
|
||||
this.newItem = opt_newItem;
|
||||
};
|
||||
Blockly.utils.object.inherits(Blockly.Events.ToolboxItemSelect, Blockly.Events.UiBase);
|
||||
object.inherits(ToolboxItemSelect, UiBase);
|
||||
|
||||
/**
|
||||
* Type of this event.
|
||||
* @type {string}
|
||||
*/
|
||||
Blockly.Events.ToolboxItemSelect.prototype.type = Blockly.Events.TOOLBOX_ITEM_SELECT;
|
||||
ToolboxItemSelect.prototype.type = Events.TOOLBOX_ITEM_SELECT;
|
||||
|
||||
/**
|
||||
* Encode the event as JSON.
|
||||
* @return {!Object} JSON representation.
|
||||
*/
|
||||
Blockly.Events.ToolboxItemSelect.prototype.toJson = function() {
|
||||
var json = Blockly.Events.ToolboxItemSelect.superClass_.toJson.call(this);
|
||||
ToolboxItemSelect.prototype.toJson = function() {
|
||||
const json = ToolboxItemSelect.superClass_.toJson.call(this);
|
||||
json['oldItem'] = this.oldItem;
|
||||
json['newItem'] = this.newItem;
|
||||
return json;
|
||||
@@ -69,11 +68,13 @@ Blockly.Events.ToolboxItemSelect.prototype.toJson = function() {
|
||||
* Decode the JSON event.
|
||||
* @param {!Object} json JSON representation.
|
||||
*/
|
||||
Blockly.Events.ToolboxItemSelect.prototype.fromJson = function(json) {
|
||||
Blockly.Events.ToolboxItemSelect.superClass_.fromJson.call(this, json);
|
||||
ToolboxItemSelect.prototype.fromJson = function(json) {
|
||||
ToolboxItemSelect.superClass_.fromJson.call(this, json);
|
||||
this.oldItem = json['oldItem'];
|
||||
this.newItem = json['newItem'];
|
||||
};
|
||||
|
||||
Blockly.registry.register(Blockly.registry.Type.EVENT,
|
||||
Blockly.Events.TOOLBOX_ITEM_SELECT, Blockly.Events.ToolboxItemSelect);
|
||||
registry.register(
|
||||
registry.Type.EVENT, Events.TOOLBOX_ITEM_SELECT, ToolboxItemSelect);
|
||||
|
||||
exports = ToolboxItemSelect;
|
||||
|
||||
@@ -10,171 +10,170 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
goog.provide('Blockly.uiPosition');
|
||||
goog.module('Blockly.uiPosition');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
goog.require('Blockly.Scrollbar');
|
||||
goog.require('Blockly.utils.Rect');
|
||||
goog.require('Blockly.utils.toolbox');
|
||||
|
||||
goog.requireType('Blockly.MetricsManager');
|
||||
goog.requireType('Blockly.WorkspaceSvg');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const MetricsManager = goog.requireType('Blockly.MetricsManager');
|
||||
const Rect = goog.require('Blockly.utils.Rect');
|
||||
const Scrollbar = goog.require('Blockly.Scrollbar');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const Size = goog.requireType('Blockly.utils.Size');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const WorkspaceSvg = goog.requireType('Blockly.WorkspaceSvg');
|
||||
const toolbox = goog.require('Blockly.utils.toolbox');
|
||||
|
||||
|
||||
/**
|
||||
* Enum for vertical positioning.
|
||||
* @enum {number}
|
||||
* @package
|
||||
*/
|
||||
Blockly.uiPosition.verticalPosition = {
|
||||
const verticalPosition = {
|
||||
TOP: 0,
|
||||
BOTTOM: 1
|
||||
};
|
||||
/** @package */
|
||||
exports.verticalPosition = verticalPosition;
|
||||
|
||||
/**
|
||||
* Enum for horizontal positioning.
|
||||
* @enum {number}
|
||||
* @package
|
||||
*/
|
||||
Blockly.uiPosition.horizontalPosition = {
|
||||
const horizontalPosition = {
|
||||
LEFT: 0,
|
||||
RIGHT: 1
|
||||
};
|
||||
/** @package */
|
||||
exports.horizontalPosition = horizontalPosition;
|
||||
|
||||
/**
|
||||
* An object defining a horizontal and vertical positioning.
|
||||
* @typedef {{
|
||||
* horizontal: !Blockly.uiPosition.horizontalPosition,
|
||||
* vertical: !Blockly.uiPosition.verticalPosition
|
||||
* horizontal: !horizontalPosition,
|
||||
* vertical: !verticalPosition
|
||||
* }}
|
||||
* @package
|
||||
*/
|
||||
Blockly.uiPosition.Position;
|
||||
let Position;
|
||||
/** @package */
|
||||
exports.Position = Position;
|
||||
|
||||
/**
|
||||
* Enum for bump rules to use for dealing with collisions.
|
||||
* @enum {number}
|
||||
* @package
|
||||
*/
|
||||
Blockly.uiPosition.bumpDirection = {
|
||||
const bumpDirection = {
|
||||
UP: 0,
|
||||
DOWN: 1
|
||||
};
|
||||
/** @package */
|
||||
exports.bumpDirection = bumpDirection;
|
||||
|
||||
/**
|
||||
* Returns a rectangle representing reasonable position for where to place a UI
|
||||
* element of the specified size given the restraints and locations of the
|
||||
* scrollbars. This method does not take into account any already placed UI
|
||||
* elements.
|
||||
* @param {!Blockly.uiPosition.Position} position The starting
|
||||
* @param {!Position} position The starting
|
||||
* horizontal and vertical position.
|
||||
* @param {!Blockly.utils.Size} size the size of the UI element to get a start
|
||||
* @param {!Size} size the size of the UI element to get a start
|
||||
* position for.
|
||||
* @param {number} horizontalPadding The horizontal padding to use.
|
||||
* @param {number} verticalPadding The vertical padding to use.
|
||||
* @param {!Blockly.MetricsManager.UiMetrics} metrics The workspace UI metrics.
|
||||
* @param {!Blockly.WorkspaceSvg} workspace The workspace.
|
||||
* @return {!Blockly.utils.Rect} The suggested start position.
|
||||
* @package
|
||||
* @param {!MetricsManager.UiMetrics} metrics The workspace UI metrics.
|
||||
* @param {!WorkspaceSvg} workspace The workspace.
|
||||
* @return {!Rect} The suggested start position.
|
||||
*/
|
||||
Blockly.uiPosition.getStartPositionRect = function(
|
||||
position, size, horizontalPadding,
|
||||
verticalPadding, metrics, workspace) {
|
||||
const getStartPositionRect = function(
|
||||
position, size, horizontalPadding, verticalPadding, metrics, workspace) {
|
||||
// Horizontal positioning.
|
||||
var left = 0;
|
||||
var hasVerticalScrollbar =
|
||||
let left = 0;
|
||||
const hasVerticalScrollbar =
|
||||
workspace.scrollbar && workspace.scrollbar.canScrollVertically();
|
||||
if (position.horizontal ===
|
||||
Blockly.uiPosition.horizontalPosition.LEFT) {
|
||||
if (position.horizontal === horizontalPosition.LEFT) {
|
||||
left = metrics.absoluteMetrics.left + horizontalPadding;
|
||||
if (hasVerticalScrollbar && workspace.RTL) {
|
||||
left += Blockly.Scrollbar.scrollbarThickness;
|
||||
left += Scrollbar.scrollbarThickness;
|
||||
}
|
||||
} else { // position.horizontal == horizontalPosition.RIGHT
|
||||
left = metrics.absoluteMetrics.left + metrics.viewMetrics.width -
|
||||
size.width - horizontalPadding;
|
||||
if (hasVerticalScrollbar && !workspace.RTL) {
|
||||
left -= Blockly.Scrollbar.scrollbarThickness;
|
||||
left -= Scrollbar.scrollbarThickness;
|
||||
}
|
||||
}
|
||||
// Vertical positioning.
|
||||
var top = 0;
|
||||
if (position.vertical ===
|
||||
Blockly.uiPosition.verticalPosition.TOP) {
|
||||
let top = 0;
|
||||
if (position.vertical === verticalPosition.TOP) {
|
||||
top = metrics.absoluteMetrics.top + verticalPadding;
|
||||
} else { // position.vertical == verticalPosition.BOTTOM
|
||||
top = metrics.absoluteMetrics.top + metrics.viewMetrics.height -
|
||||
size.height - verticalPadding;
|
||||
if (workspace.scrollbar && workspace.scrollbar.canScrollHorizontally()) {
|
||||
// The scrollbars are always positioned on the bottom if they exist.
|
||||
top -= Blockly.Scrollbar.scrollbarThickness;
|
||||
top -= Scrollbar.scrollbarThickness;
|
||||
}
|
||||
}
|
||||
return new Blockly.utils.Rect(
|
||||
top, top + size.height, left, left + size.width);
|
||||
return new Rect(top, top + size.height, left, left + size.width);
|
||||
};
|
||||
/** @package */
|
||||
exports.getStartPositionRect = getStartPositionRect;
|
||||
|
||||
/**
|
||||
* Returns a corner position that is on the opposite side of the workspace from
|
||||
* the toolbox.
|
||||
* If in horizontal orientation, defaults to the bottom corner. If in vertical
|
||||
* orientation, defaults to the right corner.
|
||||
* @param {!Blockly.WorkspaceSvg} workspace The workspace.
|
||||
* @param {!Blockly.MetricsManager.UiMetrics} metrics The workspace metrics.
|
||||
* @return {!Blockly.uiPosition.Position} The suggested corner position.
|
||||
* @package
|
||||
* @param {!WorkspaceSvg} workspace The workspace.
|
||||
* @param {!MetricsManager.UiMetrics} metrics The workspace metrics.
|
||||
* @return {!Position} The suggested corner position.
|
||||
*/
|
||||
Blockly.uiPosition.getCornerOppositeToolbox = function(workspace, metrics) {
|
||||
var leftCorner =
|
||||
metrics.toolboxMetrics.position !== Blockly.utils.toolbox.Position.LEFT &&
|
||||
const getCornerOppositeToolbox = function(workspace, metrics) {
|
||||
const leftCorner =
|
||||
metrics.toolboxMetrics.position !== toolbox.Position.LEFT &&
|
||||
(!workspace.horizontalLayout || workspace.RTL);
|
||||
var topCorner =
|
||||
metrics.toolboxMetrics.position === Blockly.utils.toolbox.Position.BOTTOM;
|
||||
var horizontalPosition = leftCorner ?
|
||||
Blockly.uiPosition.horizontalPosition.LEFT :
|
||||
Blockly.uiPosition.horizontalPosition.RIGHT;
|
||||
var verticalPosition = topCorner ?
|
||||
Blockly.uiPosition.verticalPosition.TOP :
|
||||
Blockly.uiPosition.verticalPosition.BOTTOM;
|
||||
return {
|
||||
horizontal: horizontalPosition,
|
||||
vertical: verticalPosition
|
||||
};
|
||||
const topCorner = metrics.toolboxMetrics.position === toolbox.Position.BOTTOM;
|
||||
const hPosition =
|
||||
leftCorner ? horizontalPosition.LEFT : horizontalPosition.RIGHT;
|
||||
const vPosition = topCorner ? verticalPosition.TOP : verticalPosition.BOTTOM;
|
||||
return {horizontal: hPosition, vertical: vPosition};
|
||||
};
|
||||
/** @package */
|
||||
exports.getCornerOppositeToolbox = getCornerOppositeToolbox;
|
||||
|
||||
/**
|
||||
* Returns a position Rect based on a starting position that is bumped
|
||||
* so that it doesn't intersect with any of the provided savedPositions. This
|
||||
* method does not check that the bumped position is still within bounds.
|
||||
* @param {!Blockly.utils.Rect} startRect The starting position to use.
|
||||
* @param {!Rect} startRect The starting position to use.
|
||||
* @param {number} margin The margin to use between elements when bumping.
|
||||
* @param {!Blockly.uiPosition.bumpDirection} bumpDirection The direction
|
||||
* to bump if there is a collision with an existing UI element.
|
||||
* @param {!Array<!Blockly.utils.Rect>} savedPositions List of rectangles that
|
||||
* @param {!bumpDirection} bumpDir The direction to bump if there is a collision
|
||||
* with an existing UI element.
|
||||
* @param {!Array<!Rect>} savedPositions List of rectangles that
|
||||
* represent the positions of UI elements already placed.
|
||||
* @return {!Blockly.utils.Rect} The suggested position rectangle.
|
||||
* @package
|
||||
* @return {!Rect} The suggested position rectangle.
|
||||
*/
|
||||
Blockly.uiPosition.bumpPositionRect = function(
|
||||
startRect, margin, bumpDirection, savedPositions) {
|
||||
var top = startRect.top;
|
||||
var left = startRect.left;
|
||||
var width = startRect.right - startRect.left;
|
||||
var height = startRect.bottom - startRect.top;
|
||||
const bumpPositionRect = function(startRect, margin, bumpDir, savedPositions) {
|
||||
let top = startRect.top;
|
||||
const left = startRect.left;
|
||||
const width = startRect.right - startRect.left;
|
||||
const height = startRect.bottom - startRect.top;
|
||||
|
||||
// Check for collision and bump if needed.
|
||||
var boundingRect = startRect;
|
||||
for (var i = 0, otherEl; (otherEl = savedPositions[i]); i++) {
|
||||
let boundingRect = startRect;
|
||||
for (let i = 0; i < savedPositions.length; i++) {
|
||||
const otherEl = savedPositions[i];
|
||||
if (boundingRect.intersects(otherEl)) {
|
||||
if (bumpDirection === Blockly.uiPosition.bumpDirection.UP) {
|
||||
if (bumpDir === bumpDirection.UP) {
|
||||
top = otherEl.top - height - margin;
|
||||
} else { // bumpDirection == bumpDirection.DOWN
|
||||
} else { // bumpDir == bumpDirection.DOWN
|
||||
top = otherEl.bottom + margin;
|
||||
}
|
||||
// Recheck other savedPositions
|
||||
boundingRect = new Blockly.utils.Rect(
|
||||
top, top + height, left, left + width);
|
||||
boundingRect = new Rect(top, top + height, left, left + width);
|
||||
i = -1;
|
||||
}
|
||||
}
|
||||
return boundingRect;
|
||||
};
|
||||
/** @package */
|
||||
exports.bumpPositionRect = bumpPositionRect;
|
||||
|
||||
@@ -10,26 +10,25 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @name Blockly.ShortcutItems
|
||||
* @namespace
|
||||
*/
|
||||
goog.provide('Blockly.ShortcutItems');
|
||||
goog.module('Blockly.ShortcutItems');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
goog.require('Blockly.clipboard');
|
||||
goog.require('Blockly.Gesture');
|
||||
goog.require('Blockly.ShortcutRegistry');
|
||||
goog.require('Blockly.utils.KeyCodes');
|
||||
|
||||
goog.requireType('Blockly.BlockSvg');
|
||||
goog.requireType('Blockly.ICopyable');
|
||||
const Blockly = goog.require('Blockly');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const BlockSvg = goog.requireType('Blockly.BlockSvg');
|
||||
const Gesture = goog.require('Blockly.Gesture');
|
||||
/* eslint-disable-next-line no-unused-vars */
|
||||
const ICopyable = goog.requireType('Blockly.ICopyable');
|
||||
const KeyCodes = goog.require('Blockly.utils.KeyCodes');
|
||||
const ShortcutRegistry = goog.require('Blockly.ShortcutRegistry');
|
||||
const clipboard = goog.require('Blockly.clipboard');
|
||||
|
||||
|
||||
/**
|
||||
* Object holding the names of the default shortcut items.
|
||||
* @enum {string}
|
||||
*/
|
||||
Blockly.ShortcutItems.names = {
|
||||
const names = {
|
||||
ESCAPE: 'escape',
|
||||
DELETE: 'delete',
|
||||
COPY: 'copy',
|
||||
@@ -38,12 +37,13 @@ Blockly.ShortcutItems.names = {
|
||||
UNDO: 'undo',
|
||||
REDO: 'redo'
|
||||
};
|
||||
exports.names = names;
|
||||
|
||||
/** Keyboard shortcut to hide chaff on escape. */
|
||||
Blockly.ShortcutItems.registerEscape = function() {
|
||||
/** @type {!Blockly.ShortcutRegistry.KeyboardShortcut} */
|
||||
var escapeAction = {
|
||||
name: Blockly.ShortcutItems.names.ESCAPE,
|
||||
const registerEscape = function() {
|
||||
/** @type {!ShortcutRegistry.KeyboardShortcut} */
|
||||
const escapeAction = {
|
||||
name: names.ESCAPE,
|
||||
preconditionFn: function(workspace) {
|
||||
return !workspace.options.readOnly;
|
||||
},
|
||||
@@ -52,19 +52,18 @@ Blockly.ShortcutItems.registerEscape = function() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
Blockly.ShortcutRegistry.registry.register(escapeAction);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(
|
||||
Blockly.utils.KeyCodes.ESC, escapeAction.name);
|
||||
ShortcutRegistry.registry.register(escapeAction);
|
||||
ShortcutRegistry.registry.addKeyMapping(KeyCodes.ESC, escapeAction.name);
|
||||
};
|
||||
exports.registerEscape = registerEscape;
|
||||
|
||||
/** Keyboard shortcut to delete a block on delete or backspace */
|
||||
Blockly.ShortcutItems.registerDelete = function() {
|
||||
/** @type {!Blockly.ShortcutRegistry.KeyboardShortcut} */
|
||||
var deleteShortcut = {
|
||||
name: Blockly.ShortcutItems.names.DELETE,
|
||||
const registerDelete = function() {
|
||||
/** @type {!ShortcutRegistry.KeyboardShortcut} */
|
||||
const deleteShortcut = {
|
||||
name: names.DELETE,
|
||||
preconditionFn: function(workspace) {
|
||||
return !workspace.options.readOnly &&
|
||||
Blockly.selected &&
|
||||
return !workspace.options.readOnly && Blockly.selected &&
|
||||
Blockly.selected.isDeletable();
|
||||
},
|
||||
callback: function(workspace, e) {
|
||||
@@ -74,127 +73,124 @@ Blockly.ShortcutItems.registerDelete = function() {
|
||||
// data loss.
|
||||
e.preventDefault();
|
||||
// Don't delete while dragging. Jeez.
|
||||
if (Blockly.Gesture.inProgress()) {
|
||||
if (Gesture.inProgress()) {
|
||||
return false;
|
||||
}
|
||||
Blockly.deleteBlock(/** @type {!Blockly.BlockSvg} */ (Blockly.selected));
|
||||
Blockly.deleteBlock(/** @type {!BlockSvg} */ (Blockly.selected));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
Blockly.ShortcutRegistry.registry.register(deleteShortcut);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(
|
||||
Blockly.utils.KeyCodes.DELETE, deleteShortcut.name);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(
|
||||
Blockly.utils.KeyCodes.BACKSPACE, deleteShortcut.name);
|
||||
ShortcutRegistry.registry.register(deleteShortcut);
|
||||
ShortcutRegistry.registry.addKeyMapping(KeyCodes.DELETE, deleteShortcut.name);
|
||||
ShortcutRegistry.registry.addKeyMapping(
|
||||
KeyCodes.BACKSPACE, deleteShortcut.name);
|
||||
};
|
||||
exports.registerDelete = registerDelete;
|
||||
|
||||
/** Keyboard shortcut to copy a block on ctrl+c, cmd+c, or alt+c. */
|
||||
Blockly.ShortcutItems.registerCopy = function() {
|
||||
/** @type {!Blockly.ShortcutRegistry.KeyboardShortcut} */
|
||||
var copyShortcut = {
|
||||
name: Blockly.ShortcutItems.names.COPY,
|
||||
const registerCopy = function() {
|
||||
/** @type {!ShortcutRegistry.KeyboardShortcut} */
|
||||
const copyShortcut = {
|
||||
name: names.COPY,
|
||||
preconditionFn: function(workspace) {
|
||||
return !workspace.options.readOnly &&
|
||||
!Blockly.Gesture.inProgress() &&
|
||||
Blockly.selected &&
|
||||
Blockly.selected.isDeletable() &&
|
||||
Blockly.selected.isMovable();
|
||||
return !workspace.options.readOnly && !Gesture.inProgress() &&
|
||||
Blockly.selected && Blockly.selected.isDeletable() &&
|
||||
Blockly.selected.isMovable();
|
||||
},
|
||||
callback: function(workspace, e) {
|
||||
// Prevent the default copy behavior, which may beep or otherwise indicate
|
||||
// an error due to the lack of a selection.
|
||||
e.preventDefault();
|
||||
Blockly.hideChaff();
|
||||
Blockly.clipboard.copy(/** @type {!Blockly.ICopyable} */ (Blockly.selected));
|
||||
clipboard.copy(/** @type {!ICopyable} */ (Blockly.selected));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
Blockly.ShortcutRegistry.registry.register(copyShortcut);
|
||||
ShortcutRegistry.registry.register(copyShortcut);
|
||||
|
||||
var ctrlC = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.C, [Blockly.utils.KeyCodes.CTRL]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(ctrlC, copyShortcut.name);
|
||||
const ctrlC = ShortcutRegistry.registry.createSerializedKey(
|
||||
KeyCodes.C, [KeyCodes.CTRL]);
|
||||
ShortcutRegistry.registry.addKeyMapping(ctrlC, copyShortcut.name);
|
||||
|
||||
var altC = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.C, [Blockly.utils.KeyCodes.ALT]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(altC, copyShortcut.name);
|
||||
const altC =
|
||||
ShortcutRegistry.registry.createSerializedKey(KeyCodes.C, [KeyCodes.ALT]);
|
||||
ShortcutRegistry.registry.addKeyMapping(altC, copyShortcut.name);
|
||||
|
||||
var metaC = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.C, [Blockly.utils.KeyCodes.META]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(metaC, copyShortcut.name);
|
||||
const metaC = ShortcutRegistry.registry.createSerializedKey(
|
||||
KeyCodes.C, [KeyCodes.META]);
|
||||
ShortcutRegistry.registry.addKeyMapping(metaC, copyShortcut.name);
|
||||
};
|
||||
exports.registerCopy = registerCopy;
|
||||
|
||||
/** Keyboard shortcut to copy and delete a block on ctrl+x, cmd+x, or alt+x. */
|
||||
Blockly.ShortcutItems.registerCut = function() {
|
||||
/** @type {!Blockly.ShortcutRegistry.KeyboardShortcut} */
|
||||
var cutShortcut = {
|
||||
name: Blockly.ShortcutItems.names.CUT,
|
||||
const registerCut = function() {
|
||||
/** @type {!ShortcutRegistry.KeyboardShortcut} */
|
||||
const cutShortcut = {
|
||||
name: names.CUT,
|
||||
preconditionFn: function(workspace) {
|
||||
return !workspace.options.readOnly &&
|
||||
!Blockly.Gesture.inProgress() &&
|
||||
Blockly.selected &&
|
||||
Blockly.selected.isDeletable() &&
|
||||
Blockly.selected.isMovable() &&
|
||||
!Blockly.selected.workspace.isFlyout;
|
||||
return !workspace.options.readOnly && !Gesture.inProgress() &&
|
||||
Blockly.selected && Blockly.selected.isDeletable() &&
|
||||
Blockly.selected.isMovable() && !Blockly.selected.workspace.isFlyout;
|
||||
},
|
||||
callback: function() {
|
||||
Blockly.clipboard.copy(/** @type {!Blockly.ICopyable} */ (Blockly.selected));
|
||||
Blockly.deleteBlock(/** @type {!Blockly.BlockSvg} */ (Blockly.selected));
|
||||
clipboard.copy(/** @type {!ICopyable} */ (Blockly.selected));
|
||||
Blockly.deleteBlock(/** @type {!BlockSvg} */ (Blockly.selected));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.ShortcutRegistry.registry.register(cutShortcut);
|
||||
ShortcutRegistry.registry.register(cutShortcut);
|
||||
|
||||
var ctrlX = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.X, [Blockly.utils.KeyCodes.CTRL]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(ctrlX, cutShortcut.name);
|
||||
const ctrlX = ShortcutRegistry.registry.createSerializedKey(
|
||||
KeyCodes.X, [KeyCodes.CTRL]);
|
||||
ShortcutRegistry.registry.addKeyMapping(ctrlX, cutShortcut.name);
|
||||
|
||||
var altX = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.X, [Blockly.utils.KeyCodes.ALT]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(altX, cutShortcut.name);
|
||||
const altX =
|
||||
ShortcutRegistry.registry.createSerializedKey(KeyCodes.X, [KeyCodes.ALT]);
|
||||
ShortcutRegistry.registry.addKeyMapping(altX, cutShortcut.name);
|
||||
|
||||
var metaX = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.X, [Blockly.utils.KeyCodes.META]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(metaX, cutShortcut.name);
|
||||
const metaX = ShortcutRegistry.registry.createSerializedKey(
|
||||
KeyCodes.X, [KeyCodes.META]);
|
||||
ShortcutRegistry.registry.addKeyMapping(metaX, cutShortcut.name);
|
||||
};
|
||||
exports.registerCut = registerCut;
|
||||
|
||||
/** Keyboard shortcut to paste a block on ctrl+v, cmd+v, or alt+v. */
|
||||
Blockly.ShortcutItems.registerPaste = function() {
|
||||
/** @type {!Blockly.ShortcutRegistry.KeyboardShortcut} */
|
||||
var pasteShortcut = {
|
||||
name: Blockly.ShortcutItems.names.PASTE,
|
||||
const registerPaste = function() {
|
||||
/** @type {!ShortcutRegistry.KeyboardShortcut} */
|
||||
const pasteShortcut = {
|
||||
name: names.PASTE,
|
||||
preconditionFn: function(workspace) {
|
||||
return !workspace.options.readOnly && !Blockly.Gesture.inProgress();
|
||||
return !workspace.options.readOnly && !Gesture.inProgress();
|
||||
},
|
||||
callback: function() {
|
||||
return Blockly.clipboard.paste();
|
||||
return clipboard.paste();
|
||||
}
|
||||
};
|
||||
|
||||
Blockly.ShortcutRegistry.registry.register(pasteShortcut);
|
||||
ShortcutRegistry.registry.register(pasteShortcut);
|
||||
|
||||
var ctrlV = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.V, [Blockly.utils.KeyCodes.CTRL]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(ctrlV, pasteShortcut.name);
|
||||
const ctrlV = ShortcutRegistry.registry.createSerializedKey(
|
||||
KeyCodes.V, [KeyCodes.CTRL]);
|
||||
ShortcutRegistry.registry.addKeyMapping(ctrlV, pasteShortcut.name);
|
||||
|
||||
var altV = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.V, [Blockly.utils.KeyCodes.ALT]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(altV, pasteShortcut.name);
|
||||
const altV =
|
||||
ShortcutRegistry.registry.createSerializedKey(KeyCodes.V, [KeyCodes.ALT]);
|
||||
ShortcutRegistry.registry.addKeyMapping(altV, pasteShortcut.name);
|
||||
|
||||
var metaV = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.V, [Blockly.utils.KeyCodes.META]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(metaV, pasteShortcut.name);
|
||||
const metaV = ShortcutRegistry.registry.createSerializedKey(
|
||||
KeyCodes.V, [KeyCodes.META]);
|
||||
ShortcutRegistry.registry.addKeyMapping(metaV, pasteShortcut.name);
|
||||
};
|
||||
exports.registerPaste = registerPaste;
|
||||
|
||||
/** Keyboard shortcut to undo the previous action on ctrl+z, cmd+z, or alt+z. */
|
||||
Blockly.ShortcutItems.registerUndo = function() {
|
||||
/** @type {!Blockly.ShortcutRegistry.KeyboardShortcut} */
|
||||
var undoShortcut = {
|
||||
name: Blockly.ShortcutItems.names.UNDO,
|
||||
const registerUndo = function() {
|
||||
/** @type {!ShortcutRegistry.KeyboardShortcut} */
|
||||
const undoShortcut = {
|
||||
name: names.UNDO,
|
||||
preconditionFn: function(workspace) {
|
||||
return !workspace.options.readOnly &&
|
||||
!Blockly.Gesture.inProgress();
|
||||
return !workspace.options.readOnly && !Gesture.inProgress();
|
||||
},
|
||||
callback: function(workspace) {
|
||||
// 'z' for undo 'Z' is for redo.
|
||||
@@ -203,28 +199,32 @@ Blockly.ShortcutItems.registerUndo = function() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
Blockly.ShortcutRegistry.registry.register(undoShortcut);
|
||||
ShortcutRegistry.registry.register(undoShortcut);
|
||||
|
||||
var ctrlZ = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.Z, [Blockly.utils.KeyCodes.CTRL]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(ctrlZ, undoShortcut.name);
|
||||
const ctrlZ = ShortcutRegistry.registry.createSerializedKey(
|
||||
KeyCodes.Z, [KeyCodes.CTRL]);
|
||||
ShortcutRegistry.registry.addKeyMapping(ctrlZ, undoShortcut.name);
|
||||
|
||||
var altZ = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.Z, [Blockly.utils.KeyCodes.ALT]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(altZ, undoShortcut.name);
|
||||
const altZ =
|
||||
ShortcutRegistry.registry.createSerializedKey(KeyCodes.Z, [KeyCodes.ALT]);
|
||||
ShortcutRegistry.registry.addKeyMapping(altZ, undoShortcut.name);
|
||||
|
||||
var metaZ = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.Z, [Blockly.utils.KeyCodes.META]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(metaZ, undoShortcut.name);
|
||||
const metaZ = ShortcutRegistry.registry.createSerializedKey(
|
||||
KeyCodes.Z, [KeyCodes.META]);
|
||||
ShortcutRegistry.registry.addKeyMapping(metaZ, undoShortcut.name);
|
||||
};
|
||||
exports.registerUndo = registerUndo;
|
||||
|
||||
/** Keyboard shortcut to redo the previous action on ctrl+shift+z, cmd+shift+z, or alt+shift+z. */
|
||||
Blockly.ShortcutItems.registerRedo = function() {
|
||||
/** @type {!Blockly.ShortcutRegistry.KeyboardShortcut} */
|
||||
var redoShortcut = {
|
||||
name: Blockly.ShortcutItems.names.REDO,
|
||||
/**
|
||||
* Keyboard shortcut to redo the previous action on ctrl+shift+z, cmd+shift+z,
|
||||
* or alt+shift+z.
|
||||
*/
|
||||
const registerRedo = function() {
|
||||
/** @type {!ShortcutRegistry.KeyboardShortcut} */
|
||||
const redoShortcut = {
|
||||
name: names.REDO,
|
||||
preconditionFn: function(workspace) {
|
||||
return !Blockly.Gesture.inProgress() && !workspace.options.readOnly;
|
||||
return !Gesture.inProgress() && !workspace.options.readOnly;
|
||||
},
|
||||
callback: function(workspace) {
|
||||
// 'z' for undo 'Z' is for redo.
|
||||
@@ -233,44 +233,41 @@ Blockly.ShortcutItems.registerRedo = function() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
Blockly.ShortcutRegistry.registry.register(redoShortcut);
|
||||
ShortcutRegistry.registry.register(redoShortcut);
|
||||
|
||||
var ctrlShiftZ = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.Z,
|
||||
[Blockly.utils.KeyCodes.SHIFT, Blockly.utils.KeyCodes.CTRL]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(
|
||||
ctrlShiftZ, redoShortcut.name);
|
||||
const ctrlShiftZ = ShortcutRegistry.registry.createSerializedKey(
|
||||
KeyCodes.Z, [KeyCodes.SHIFT, KeyCodes.CTRL]);
|
||||
ShortcutRegistry.registry.addKeyMapping(ctrlShiftZ, redoShortcut.name);
|
||||
|
||||
var altShiftZ = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.Z,
|
||||
[Blockly.utils.KeyCodes.SHIFT, Blockly.utils.KeyCodes.ALT]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(altShiftZ, redoShortcut.name);
|
||||
const altShiftZ = ShortcutRegistry.registry.createSerializedKey(
|
||||
KeyCodes.Z, [KeyCodes.SHIFT, KeyCodes.ALT]);
|
||||
ShortcutRegistry.registry.addKeyMapping(altShiftZ, redoShortcut.name);
|
||||
|
||||
var metaShiftZ = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.Z,
|
||||
[Blockly.utils.KeyCodes.SHIFT, Blockly.utils.KeyCodes.META]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(
|
||||
metaShiftZ, redoShortcut.name);
|
||||
const metaShiftZ = ShortcutRegistry.registry.createSerializedKey(
|
||||
KeyCodes.Z, [KeyCodes.SHIFT, KeyCodes.META]);
|
||||
ShortcutRegistry.registry.addKeyMapping(metaShiftZ, redoShortcut.name);
|
||||
|
||||
// Ctrl-y is redo in Windows. Command-y is never valid on Macs.
|
||||
var ctrlY = Blockly.ShortcutRegistry.registry.createSerializedKey(
|
||||
Blockly.utils.KeyCodes.Y, [Blockly.utils.KeyCodes.CTRL]);
|
||||
Blockly.ShortcutRegistry.registry.addKeyMapping(ctrlY, redoShortcut.name);
|
||||
const ctrlY = ShortcutRegistry.registry.createSerializedKey(
|
||||
KeyCodes.Y, [KeyCodes.CTRL]);
|
||||
ShortcutRegistry.registry.addKeyMapping(ctrlY, redoShortcut.name);
|
||||
};
|
||||
exports.registerRedo = registerRedo;
|
||||
|
||||
/**
|
||||
* Registers all default keyboard shortcut item. This should be called once per instance of
|
||||
* KeyboardShortcutRegistry.
|
||||
* @package
|
||||
* Registers all default keyboard shortcut item. This should be called once per
|
||||
* instance of KeyboardShortcutRegistry.
|
||||
*/
|
||||
Blockly.ShortcutItems.registerDefaultShortcuts = function() {
|
||||
Blockly.ShortcutItems.registerEscape();
|
||||
Blockly.ShortcutItems.registerDelete();
|
||||
Blockly.ShortcutItems.registerCopy();
|
||||
Blockly.ShortcutItems.registerCut();
|
||||
Blockly.ShortcutItems.registerPaste();
|
||||
Blockly.ShortcutItems.registerUndo();
|
||||
Blockly.ShortcutItems.registerRedo();
|
||||
const registerDefaultShortcuts = function() {
|
||||
registerEscape();
|
||||
registerDelete();
|
||||
registerCopy();
|
||||
registerCut();
|
||||
registerPaste();
|
||||
registerUndo();
|
||||
registerRedo();
|
||||
};
|
||||
/** @package */
|
||||
exports.registerDefaultShortcuts = registerDefaultShortcuts;
|
||||
|
||||
Blockly.ShortcutItems.registerDefaultShortcuts();
|
||||
registerDefaultShortcuts();
|
||||
|
||||
@@ -39,10 +39,10 @@ goog.addDependency('../../core/events/events_abstract.js', ['Blockly.Events.Abst
|
||||
goog.addDependency('../../core/events/events_block_drag.js', ['Blockly.Events.BlockDrag'], ['Blockly.Events', 'Blockly.Events.UiBase', 'Blockly.registry', 'Blockly.utils.object']);
|
||||
goog.addDependency('../../core/events/events_bubble_open.js', ['Blockly.Events.BubbleOpen'], ['Blockly.Events', 'Blockly.Events.UiBase', 'Blockly.registry', 'Blockly.utils.object']);
|
||||
goog.addDependency('../../core/events/events_click.js', ['Blockly.Events.Click'], ['Blockly.Events', 'Blockly.Events.UiBase', 'Blockly.registry', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/events/events_marker_move.js', ['Blockly.Events.MarkerMove'], ['Blockly.Events', 'Blockly.Events.UiBase', 'Blockly.registry', 'Blockly.utils.object']);
|
||||
goog.addDependency('../../core/events/events_marker_move.js', ['Blockly.Events.MarkerMove'], ['Blockly.ASTNode', 'Blockly.Events', 'Blockly.Events.UiBase', 'Blockly.registry', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/events/events_selected.js', ['Blockly.Events.Selected'], ['Blockly.Events', 'Blockly.Events.UiBase', 'Blockly.registry', 'Blockly.utils.object']);
|
||||
goog.addDependency('../../core/events/events_theme_change.js', ['Blockly.Events.ThemeChange'], ['Blockly.Events', 'Blockly.Events.UiBase', 'Blockly.registry', 'Blockly.utils.object']);
|
||||
goog.addDependency('../../core/events/events_toolbox_item_select.js', ['Blockly.Events.ToolboxItemSelect'], ['Blockly.Events', 'Blockly.Events.UiBase', 'Blockly.registry', 'Blockly.utils.object']);
|
||||
goog.addDependency('../../core/events/events_toolbox_item_select.js', ['Blockly.Events.ToolboxItemSelect'], ['Blockly.Events', 'Blockly.Events.UiBase', 'Blockly.registry', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/events/events_trashcan_open.js', ['Blockly.Events.TrashcanOpen'], ['Blockly.Events', 'Blockly.Events.UiBase', 'Blockly.registry', 'Blockly.utils.object']);
|
||||
goog.addDependency('../../core/events/events_viewport.js', ['Blockly.Events.ViewportChange'], ['Blockly.Events', 'Blockly.Events.UiBase', 'Blockly.registry', 'Blockly.utils.object']);
|
||||
goog.addDependency('../../core/events/ui_events.js', ['Blockly.Events.Ui', 'Blockly.Events.UiBase'], ['Blockly.Events', 'Blockly.Events.Abstract', 'Blockly.registry', 'Blockly.utils.object']);
|
||||
@@ -117,7 +117,7 @@ goog.addDependency('../../core/msg.js', ['Blockly.Msg'], ['Blockly.utils.global'
|
||||
goog.addDependency('../../core/mutator.js', ['Blockly.Mutator'], ['Blockly.Bubble', 'Blockly.Events', 'Blockly.Events.BlockChange', 'Blockly.Events.BubbleOpen', 'Blockly.Icon', 'Blockly.Options', 'Blockly.WorkspaceSvg', 'Blockly.Xml', 'Blockly.internalConstants', 'Blockly.utils.Svg', 'Blockly.utils.dom', 'Blockly.utils.object', 'Blockly.utils.toolbox', 'Blockly.utils.xml'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/names.js', ['Blockly.Names'], ['Blockly.Msg', 'Blockly.internalConstants']);
|
||||
goog.addDependency('../../core/options.js', ['Blockly.Options'], ['Blockly.Theme', 'Blockly.Themes.Classic', 'Blockly.registry', 'Blockly.utils.IdGenerator', 'Blockly.utils.Metrics', 'Blockly.utils.toolbox']);
|
||||
goog.addDependency('../../core/positionable_helpers.js', ['Blockly.uiPosition'], ['Blockly.Scrollbar', 'Blockly.utils.Rect', 'Blockly.utils.toolbox']);
|
||||
goog.addDependency('../../core/positionable_helpers.js', ['Blockly.uiPosition'], ['Blockly.Scrollbar', 'Blockly.utils.Rect', 'Blockly.utils.toolbox'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/procedures.js', ['Blockly.Procedures'], ['Blockly.Blocks', 'Blockly.Events', 'Blockly.Events.BlockChange', 'Blockly.Field', 'Blockly.Msg', 'Blockly.Names', 'Blockly.Workspace', 'Blockly.Xml', 'Blockly.internalConstants', 'Blockly.utils.xml']);
|
||||
goog.addDependency('../../core/registry.js', ['Blockly.registry'], [], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/rendered_connection.js', ['Blockly.RenderedConnection'], ['Blockly.Connection', 'Blockly.Events', 'Blockly.connectionTypes', 'Blockly.internalConstants', 'Blockly.utils', 'Blockly.utils.Coordinate', 'Blockly.utils.Svg', 'Blockly.utils.deprecation', 'Blockly.utils.dom', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
@@ -162,7 +162,7 @@ goog.addDependency('../../core/renderers/zelos/renderer.js', ['Blockly.zelos.Ren
|
||||
goog.addDependency('../../core/requires.js', ['Blockly.requires'], ['Blockly', 'Blockly.Comment', 'Blockly.ContextMenuItems', 'Blockly.FieldAngle', 'Blockly.FieldCheckbox', 'Blockly.FieldColour', 'Blockly.FieldDropdown', 'Blockly.FieldImage', 'Blockly.FieldLabelSerializable', 'Blockly.FieldMultilineInput', 'Blockly.FieldNumber', 'Blockly.FieldTextInput', 'Blockly.FieldVariable', 'Blockly.FlyoutButton', 'Blockly.Generator', 'Blockly.HorizontalFlyout', 'Blockly.Mutator', 'Blockly.ShortcutItems', 'Blockly.Themes.Classic', 'Blockly.Toolbox', 'Blockly.Trashcan', 'Blockly.VariablesDynamic', 'Blockly.VerticalFlyout', 'Blockly.Warning', 'Blockly.ZoomControls', 'Blockly.geras.Renderer', 'Blockly.thrasos.Renderer', 'Blockly.zelos.Renderer']);
|
||||
goog.addDependency('../../core/scrollbar.js', ['Blockly.Scrollbar'], ['Blockly.Touch', 'Blockly.browserEvents', 'Blockly.utils', 'Blockly.utils.Coordinate', 'Blockly.utils.Svg', 'Blockly.utils.dom'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/scrollbar_pair.js', ['Blockly.ScrollbarPair'], ['Blockly.Events', 'Blockly.Scrollbar', 'Blockly.utils.Svg', 'Blockly.utils.dom'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/shortcut_items.js', ['Blockly.ShortcutItems'], ['Blockly.Gesture', 'Blockly.ShortcutRegistry', 'Blockly.clipboard', 'Blockly.utils.KeyCodes']);
|
||||
goog.addDependency('../../core/shortcut_items.js', ['Blockly.ShortcutItems'], ['Blockly', 'Blockly.Gesture', 'Blockly.ShortcutRegistry', 'Blockly.clipboard', 'Blockly.utils.KeyCodes'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/shortcut_registry.js', ['Blockly.ShortcutRegistry'], ['Blockly.utils.KeyCodes', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/theme.js', ['Blockly.Theme'], ['Blockly.registry', 'Blockly.utils.object'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/theme/classic.js', ['Blockly.Themes.Classic'], ['Blockly.Theme']);
|
||||
|
||||
Reference in New Issue
Block a user