Remove unnecessary code, better styling.

This commit is contained in:
Sam El-Husseini
2018-03-02 15:33:44 -08:00
parent b32dbcdb94
commit 8d9dad8898

View File

@@ -452,9 +452,7 @@ Blockly.bindEventWithChecks_ = function(node, name, thisObject, func,
};
var bindData = [];
var bindData = [];
if (window && window.PointerEvent &&
(name in Blockly.Touch.TOUCH_MAP)) {
if (window && window.PointerEvent && (name in Blockly.Touch.TOUCH_MAP)) {
for (var i = 0, type; type = Blockly.Touch.TOUCH_MAP[name][i]; i++) {
node.addEventListener(type, wrapFunc, false);
bindData.push([node, type, wrapFunc]);
@@ -507,8 +505,7 @@ Blockly.bindEvent_ = function(node, name, thisObject, func) {
};
var bindData = [];
if (window && window.PointerEvent &&
(name in Blockly.Touch.TOUCH_MAP)) {
if (window && window.PointerEvent && (name in Blockly.Touch.TOUCH_MAP)) {
for (var i = 0, type; type = Blockly.Touch.TOUCH_MAP[name][i]; i++) {
node.addEventListener(type, wrapFunc, false);
bindData.push([node, type, wrapFunc]);