Zulko / eagle.js

A hackable slideshow framework built with Vue.js
https://zulko.github.io/eaglejs-demo/
ISC License
4.08k stars 221 forks source link

Event listener added to window instead of Slideshow element #31

Closed yaodingyd closed 6 years ago

yaodingyd commented 6 years ago

For event click and wheel, (or later added touch support), these should be registered to Slideshow element instead of window.

Zulko commented 6 years ago

This one is a bit tricky actually, the change you propose will break a part of my demo slides.

In these demo slides I show a "slideshow inside a slideshow" (the one with deadpool). Right now, clicking on the right triggers a next slide event both in the whole slideshow and in the embedded slideshow, but with the change you propose only the embedding slideshow will advance, not the emmbedded one.

I'm not against the the change, but keep in mind that then the slideshow-in-slideshow feature (which can be very useful at times) will need another mechanism, for instance by enabling to externally force the slide (and step) of a slideshow.

yaodingyd commented 6 years ago

I do underestimate the workload, but I think I'm on to something here. I believe the 'inserted' and 'embedded' slide/slideshow have some inconsistency with event. I'll come with a better description of my findings.

yaodingyd commented 6 years ago

Considering how inserted and embedded slideshow works, event registering to window is proper. Will open another defect for my findings.