js: Patch vendor library sparkline to ensure compatibility with jQuery v3

This commit is contained in:
Johannes Meyer 2019-07-16 11:40:47 +02:00
parent f8d3f43965
commit 3310bbc680
2 changed files with 10 additions and 10 deletions

View File

@ -711,9 +711,9 @@
var $canvas = $(canvas.canvas);
this.canvas = canvas;
this.$canvas = $canvas;
$canvas.mouseenter($.proxy(this.mouseenter, this));
$canvas.mouseleave($.proxy(this.mouseleave, this));
$canvas.click($.proxy(this.mouseclick, this));
$canvas.on('mouseenter', $.proxy(this.mouseenter, this));
$canvas.on('mouseleave', $.proxy(this.mouseleave, this));
$canvas.on('click', $.proxy(this.mouseclick, this));
},
reset: function (removeTooltip) {
@ -732,8 +732,8 @@
},
mouseenter: function (e) {
$(document.body).unbind('mousemove.jqs');
$(document.body).bind('mousemove.jqs', $.proxy(this.mousemove, this));
$(document.body).off('mousemove.jqs');
$(document.body).on('mousemove.jqs', $.proxy(this.mousemove, this));
this.over = true;
this.currentPageX = e.pageX;
this.currentPageY = e.pageY;
@ -746,7 +746,7 @@
},
mouseleave: function () {
$(document.body).unbind('mousemove.jqs');
$(document.body).off('mousemove.jqs');
var splist = this.splist,
spcount = splist.length,
needsRefresh = false,
@ -852,8 +852,8 @@
this.offsetLeft = offset.left;
this.offsetTop = offset.top;
this.hidden = true;
$(window).unbind('resize.jqs scroll.jqs');
$(window).bind('resize.jqs scroll.jqs', $.proxy(this.updateWindowDims, this));
$(window).off('resize.jqs scroll.jqs');
$(window).on('resize.jqs scroll.jqs', $.proxy(this.updateWindowDims, this));
this.updateWindowDims();
},
@ -928,7 +928,7 @@
this.tooltip.remove();
this.sizetip.remove();
this.sizetip = this.tooltip = undefined;
$(window).unbind('resize.jqs scroll.jqs');
$(window).off('resize.jqs scroll.jqs');
}
});

File diff suppressed because one or more lines are too long