app/assets/javascript/pageflow/linkmap_page/widgets/linkmap.js in pageflow-linkmap-page-1.0.0 vs app/assets/javascript/pageflow/linkmap_page/widgets/linkmap.js in pageflow-linkmap-page-1.1.0
- old
+ new
@@ -34,28 +34,16 @@
this.element.on('click', function(event) {
var area = widget.areaAt(widget.positionFromEvent(event));
if (area.length) {
- area.first().trigger('linkmapareaclick');
+ area.first().trigger($.Event('linkmapareaclick', {originalEvent: event}));
}
else {
widget._trigger('backgroundclick');
}
return false;
- });
-
- this.element.on('touchstart', function(event) {
- var area = widget.areaAt(widget.positionFromEvent(event.originalEvent.touches[0]));
-
- var areaEvent = jQuery.Event('linkmapareatouchstart');
-
- area.first().trigger(areaEvent);
-
- if (areaEvent.isDefaultPrevented()) {
- event.preventDefault();
- }
});
this.element.on('mousemove mouseleave', function(event) {
widget.updateHoverStates(event);
});
\ No newline at end of file