Update deprecated jQuery functions for jquery.flot

This commit is contained in:
roykho 2021-02-03 09:24:02 -08:00 committed by Jonathan Sadowski
parent 176cd16278
commit ac445e058c
2 changed files with 6 additions and 6 deletions

View File

@ -120,10 +120,10 @@ More detail and specific examples can be found in the included HTML file.
var options = plot.getOptions();
if (options.series.pie.show) {
if (options.grid.hoverable) {
eventHolder.unbind("mousemove").mousemove(onMouseMove);
eventHolder.off("mousemove").on( 'mousemove', onMouseMove );
}
if (options.grid.clickable) {
eventHolder.unbind("click").click(onClick);
eventHolder.off("click").on( 'click', onClick );
}
}
});
@ -180,11 +180,11 @@ More detail and specific examples can be found in the included HTML file.
// new one; this is more efficient and preserves any extra data
// that the user may have stored in higher indexes.
if ($.isArray(value) && value.length == 1) {
if (Array.isArray(value) && value.length == 1) {
value = value[0];
}
if ($.isArray(value)) {
if (Array.isArray(value)) {
// Equivalent to $.isNumeric() but compatible with jQuery < 1.7
if (!isNaN(parseFloat(value[1])) && isFinite(value[1])) {
value[1] = +value[1];
@ -814,4 +814,4 @@ More detail and specific examples can be found in the included HTML file.
version: "1.1"
});
})(jQuery);
})(jQuery);

View File

@ -40,7 +40,7 @@ can just fix the size of their placeholders.
}
function bindEvents(plot, eventHolder) {
plot.getPlaceholder().resize(onResize);
plot.getPlaceholder().on( 'resize', onResize );
}
function shutdown(plot, eventHolder) {