added "_this" reference for setTimeout

This commit is contained in:
Ken Thompson 2014-03-27 20:49:43 -05:00
parent 3f14a96c5a
commit fa8bd1f40b

View file

@ -180,8 +180,9 @@
if (e.type === 'touchend') {
// Wait 400ms before rebinding mousedown to prevent double triggers
// from touch devices
var _this = this;
setTimeout(function() {
addListener(this.upperCanvasEl, 'mousedown', this._onMouseDown);
addListener(_this.upperCanvasEl, 'mousedown', _this._onMouseDown);
}, 400);
}
},