mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
Use Context Menu registry for block-level menu options (#4032)
Use registry for block-level context menu items.
This commit is contained in:
committed by
GitHub
parent
40efb59a34
commit
e4bbd451a3
@@ -558,6 +558,24 @@ Blockly.Workspace.prototype.hasBlockLimits = function() {
|
||||
return this.options.maxBlocks != Infinity || !!this.options.maxInstances;
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the undo stack for workplace.
|
||||
* @return {!Array.<!Blockly.Events.Abstract>} undo stack
|
||||
* @package
|
||||
*/
|
||||
Blockly.Workspace.prototype.getUndoStack = function() {
|
||||
return this.undoStack_;
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the redo stack for workplace.
|
||||
* @return {!Array.<!Blockly.Events.Abstract>} redo stack
|
||||
* @package
|
||||
*/
|
||||
Blockly.Workspace.prototype.getRedoStack = function() {
|
||||
return this.redoStack_;
|
||||
};
|
||||
|
||||
/**
|
||||
* Undo or redo the previous action.
|
||||
* @param {boolean} redo False if undo, true if redo.
|
||||
|
||||
Reference in New Issue
Block a user