Switch to central controller for distributed control flow

This commit is contained in:
Ludwig Schubert
2017-08-09 16:47:35 -07:00
parent 929b159aaa
commit 9fe826447b
37 changed files with 5358 additions and 4778 deletions
+3 -3
View File
@@ -94,7 +94,7 @@ HoverBox.prototype.bind = function bind(node) {
}
// Don't trigger body touchstart event when touching link
e.stopPropagation();
}.bind(this));
}.bind(this), {passive: true});
}
HoverBox.prototype.bindDivEvents = function bindDivEvents(node){
@@ -106,7 +106,7 @@ HoverBox.prototype.bindDivEvents = function bindDivEvents(node){
this.div.addEventListener("mouseout", function(){this.extendTimeout(250);}.bind(this));
// Don't trigger body touchstart event when touching within box
this.div.addEventListener("touchstart", function(e){e.stopPropagation();});
this.div.addEventListener("touchstart", function(e){e.stopPropagation();}, {passive: true});
// Close box when touching outside box
document.body.addEventListener("touchstart", function(){this.hide();}.bind(this));
document.body.addEventListener("touchstart", function(){this.hide();}.bind(this), {passive: true});
}