Merge pull request #96 from carloslfu/workspaces_longpress

Enable long-press context menu for Workspaces.
This commit is contained in:
Neil Fraser
2015-07-13 17:15:29 -07:00

View File

@@ -135,6 +135,9 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) {
}
Blockly.bindEvent_(this.svgGroup_, 'mousedown', this, this.onMouseDown_);
var thisWorkspace = this;
Blockly.bindEvent_(this.svgGroup_, 'touchstart', null,
function(e) {Blockly.longStart_(e, thisWorkspace);});
// Determine if there needs to be a category tree, or a simple list of
// blocks. This cannot be changed later, since the UI is very different.