scaleflex / js-cloudimage-360-view

Engage your customers with a stunning 360 view of your products. Any questions or issues, please report to https://github.com/scaleflex/js-cloudimage-360-view/issues
Other
2.02k stars 232 forks source link

add a check to see if magnifying icon has already been added to icons… #162

Open ianardavis opened 7 months ago

ianardavis commented 7 months ago

… container

ianardavis commented 7 months ago

Experienced issue when using plugin:

using not init on load "" in html.

add "images360.setAttribute( 'data-amount-x', imageList.length );" in JS file

initialising and adding hotspots window.CI360.init(); window.CI360.addHotspots( 'images360', HOTSPOTS_CONFIG );

No errors occur in window, but two magnifying icons are present. this PR adds a check in the addMagnifying function to check there is not already an icon present before adding a new one.