adaptlearning / adapt_framework

A toolkit for creating responsive, accessible, multilanguage HTML5 e-learning courses.
https://www.adaptlearning.org/
GNU General Public License v3.0
572 stars 246 forks source link

adapt-contrib-hotgraphic: pin graphic causes duplication on resize #2435

Closed SteveX closed 4 years ago

SteveX commented 5 years ago

Resize of browser causes duplication in DOM

When a hotgraphic item has a pin graphic and the browser window is resized, the component can be duplicated resulting in multiple copies of the hotgraphic in the page.

Your environment

Steps to reproduce

Add a pin graphic (in the authoring tool), then preview. Drag the browser window until the mobile view is triggered, then wider again. The hotgraphic component is duplicated in the DOM. Resize several times and there will be multiple copies in the page.

oliverfoster commented 5 years ago

Does it happen on any browser resize or just when switching from small, medium and large layouts?

moloko commented 4 years ago

@SteveX believe this is now fixed in v5 of hotgraphic; alternatively you might want to look at adapt-hotgrid which should have the same functionality. Be interested to know if that would suit as we're considering dropping the 'use graphics as pins' functionality from hotgraphic and directing people to use hotgrid instead.