fix region editor canvasAreaDraw

mitchross-coral-installer-update
Moe Alam 2021-01-20 06:04:20 -08:00
parent e352cd71cd
commit 1e395dff60
1 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
// http://iakob.com/canvas-area-draw/demo.html
// https://gitlab.com/fahrenheit/community/jquery-canvas-area-draw
// Authored by Jacob Williams (https://gitlab.com/singlow)
// updated by Moe Alam, Shinobi Systems for jQuery 3.5.1
(function ($) {
$.fn.canvasAreaDraw = function (options) {
@ -37,7 +41,7 @@
$canvas.attr('height', image.height).attr('width', image.width);
draw();
};
$(image).load(resize);
$(image).on('load', resize);
image.src = settings.imageUrl;
if (image.loaded) {
resize();