From 24a669c19a7e4fa1780470139578341d0bcd3873 Mon Sep 17 00:00:00 2001 From: Brad Simpson Date: Tue, 10 Sep 2024 15:15:20 -0600 Subject: [PATCH] Allow additional custom classes on tooltips --- js/hotgraphicModel.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/hotgraphicModel.js b/js/hotgraphicModel.js index c2d022d..bf88c27 100644 --- a/js/hotgraphicModel.js +++ b/js/hotgraphicModel.js @@ -21,10 +21,10 @@ export default class HotgraphicModel extends ItemsComponentModel { const tooltip = child.get('_tooltip'); if (!tooltip?._isEnabled) return; tooltip._id = `hotgraphic-pin-${id}-${index}`; + tooltip._classes = (tooltip._classes || '') + ' hotgraphic__pin-tooltip'; const tooltipConfig = { _isStatic: hasStaticTooltips, ...child.toJSON(), - _classes: [ 'hotgraphic__pin-tooltip' ], ...tooltip }; tooltipConfig._position = tooltipConfig._position || 'outside bottom middle middle'; @@ -32,7 +32,6 @@ export default class HotgraphicModel extends ItemsComponentModel { child.on('change', () => { tooltipModel.set({ ...child.toJSON(), - _classes: [ 'hotgraphic__pin-tooltip' ], ...tooltip }); });