Browse Source

Merge pull request #446 from twbs/fat-fix-fingerblaster

Fix fingerblaster to use new custom event objects
pull/478/head
Connor Sears 11 years ago
parent
commit
40260dabee
  1. 2
      docs/assets/js/docs.min.js
  2. 26
      docs/assets/js/fingerblast.js

2
docs/assets/js/docs.min.js vendored

File diff suppressed because one or more lines are too long

26
docs/assets/js/fingerblast.js

@ -227,16 +227,22 @@
}, },
createMouseEvent: function (eventName, originalEvent) { createMouseEvent: function (eventName, originalEvent) {
var e = document.createEvent('MouseEvent'); var e = new MouseEvent(eventName, {
'view' : window,
e.initMouseEvent(eventName, true, true, 'detail' : originalEvent.detail,
originalEvent.view, originalEvent.detail, 'bubbles' : true,
this.x || originalEvent.screenX, this.y || originalEvent.screenY, 'cancelable' : true,
this.x || originalEvent.clientX, this.y || originalEvent.clientY, 'target' : this.target || originalEvent.relatedTarget,
originalEvent.ctrlKey, originalEvent.shiftKey, 'clientX' : this.x || originalEvent.clientX,
originalEvent.altKey, originalEvent.metaKey, 'clientY' : this.y || originalEvent.clientY,
originalEvent.button, this.target || originalEvent.relatedTarget 'screenX' : this.x || originalEvent.screenX,
); 'screenY' : this.y || originalEvent.screenY,
'ctrlKey' : originalEvent.ctrlKey,
'shiftKey' : originalEvent.shiftKey,
'altKey' : originalEvent.altKey,
'metaKey' : originalEvent.metaKey,
'button' : originalEvent.button
});
e.synthetic = true; e.synthetic = true;
e._finger = this; e._finger = this;

Loading…
Cancel
Save