Commit fd1e63e2 authored by Neil Fraser's avatar Neil Fraser

Merge pull request #96 from carloslfu/workspaces_longpress

Enable long-press context menu for Workspaces.
parents e0f90e6e 9c4b83f7
...@@ -135,6 +135,9 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) { ...@@ -135,6 +135,9 @@ Blockly.WorkspaceSvg.prototype.createDom = function(opt_backgroundClass) {
} }
Blockly.bindEvent_(this.svgGroup_, 'mousedown', this, this.onMouseDown_); 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 // 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. // blocks. This cannot be changed later, since the UI is very different.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment