Commit 09f5ac6f authored by Neil Fraser's avatar Neil Fraser

Remove non-functioning workspace long-click.

parent fd1e63e2
This diff is collapsed.
......@@ -1208,7 +1208,7 @@ Blockly.Block.prototype.removeInput = function(name, opt_quiet) {
/**
* Fetches the named input object.
* @param {string} name The name of the input.
* @return {?Blockly.Input} The input object, or null of the input does not exist.
* @return {Blockly.Input} The input object, or null of the input does not exist.
*/
Blockly.Block.prototype.getInput = function(name) {
for (var i = 0, input; input = this.inputList[i]; i++) {
......
......@@ -391,19 +391,15 @@ Blockly.longPid_ = 0;
* which after about a second opens the context menu. The tasks is killed
* if the touch event terminates early.
* @param {!Event} e Touch start event.
* @param {Blockly.Block} block The block under the touchstart event, or null
* if the event was on the workspace.
* @param {!Blockly.Block|!Blockly.WorkspaceSvg} uiObject The block or workspace
* under the touchstart event.
* @private
*/
Blockly.longStart_ = function(e, block) {
Blockly.longStart_ = function(e, uiObject) {
Blockly.longStop_();
Blockly.longPid_ = setTimeout(function() {
e.button = 2; // Simulate a right button click.
if (block) {
block.onMouseDown_(e);
} else {
Blockly.onMouseDown_(e);
}
uiObject.onMouseDown_(e);
}, Blockly.LONGPRESS);
};
......
......@@ -38,7 +38,7 @@ goog.require('goog.dom');
*/
Blockly.Connection = function(source, type) {
this.sourceBlock_ = source;
/** @type {?Blockly.Connection} */
/** @type {Blockly.Connection} */
this.targetConnection = null;
/** @type {number} */
this.type = type;
......
......@@ -180,7 +180,7 @@ Blockly.Field.prototype.setVisible = function(visible) {
/**
* Sets a new change handler for editable fields.
* @param {?Function} handler New change handler, or null.
* @param {Function} handler New change handler, or null.
*/
Blockly.Field.prototype.setChangeHandler = function(handler) {
this.changeHandler_ = handler;
......
......@@ -412,8 +412,6 @@ Blockly.init_ = function(mainWorkspace) {
// Also, 'keydown' has to be on the whole document since the browser doesn't
// understand a concept of focus on the SVG image.
Blockly.bindEvent_(svg, 'touchstart', null,
function(e) {Blockly.longStart_(e, null);});
Blockly.bindEvent_(window, 'resize', null,
function() {Blockly.svgResize(mainWorkspace);});
......
......@@ -47,14 +47,15 @@ Blockly.Input = function(type, name, block, connection) {
this.type = type;
/** @type {string} */
this.name = name;
/** @type {!Blockly.Block} */
this.sourceBlock_ = block;
/** @type {Blockly.Connection} */
this.connection = connection;
/** @type {Blockly.Field[]} */
/** @type {!Array.<!Blockly.Field>} */
this.fieldRow = [];
/** @type {number} */
this.align = Blockly.ALIGN_LEFT;
/** @type {boolean} */
this.visible_ = true;
};
......
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