From 3b0b26cc8eb84a62857906ac8b7adc73c889f790 Mon Sep 17 00:00:00 2001 From: hhaensel Date: Mon, 7 Oct 2024 22:59:35 +0200 Subject: [PATCH] fix sync message for Vue 3 --- assets/js/syncplot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/js/syncplot.js b/assets/js/syncplot.js index c548d7a..a91ec11 100644 --- a/assets/js/syncplot.js +++ b/assets/js/syncplot.js @@ -42,8 +42,8 @@ function watchGraphDiv(gd, model, prefix) { } return cursor } - - console.info('Syncing plot of class \'' + gd.className + '\' to ' + model.$el.id + '.' + prefix) + var id = model.$el.id || model.$el.parentElement.id // Vue-2 / Vue-3 compatibility + console.info('Syncing plot of class \'' + gd.className + '\' to ' + id + '.' + prefix) gd.on("plotly_selected", function (data) { var filteredEventData = filterEventData(gd, data, 'selected') if (!filteredEventData.isNil) { model[prefix + '_selected'] = filteredEventData.out }