-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for use with ember-wormhole #14
Comments
I'll definitely look into it. |
yeap, ti might be very useful. When ember-liquidfire is in use, it gives full page height, and photoswipe renders in the middle of nowhere :) |
^having the same issue |
Is this project no longer maintained? |
I suppose that if this feature were to be added now it might make sense to use the new |
Just ran into this problem too... |
I would suggest looking into https://github.com/glidejs/glide - as it worked well for me as a replacement for this library. And you don't need much integration with ember. |
I don't think glide is a good replacement at all, they do different things. I think with ember-auto-import it should be fairly simple for people to roll their own photoswipe backed components though. |
@evoactivity indeed, apologies. Confused this addon with owl carousel :) I didn't have particular love to photoswipe and owl carousel... so ditched photoswipe and used glide instead of owl. |
So it seems the in-element feature isn't available yet in Ember. If you try you get an error message saying you can't use in-element. I read things about using a private API using -in-element but couldn't seem to get that to work at all - the element never moved. I then had a play with ember-wormhole. I moved the pswp element into it's own component such that it looked like this:
Unfortunately this however broke the ember photoswipe component which uses jquery to find the pswp component.
Since it's been wormholed it can no longer be found.
Then it's just a case of putting the destination in to the options. So I created a third example on the application.hbs page
/tests/dummy/app/controllers/application.js
I've pushed a copy of this to here: I've not added a pull request as yet though as I thought I'd just get peoples thoughts first. |
@MrChriZ nice work! I haven't tried it yet, but I believe you need the in-element polyfill: https://github.com/kaliber5/ember-in-element-polyfill#readme |
Thanks - I did have a go with the polyfill as well but couldn't seem to get anywhere with it. |
RuzlanZavacy mentioned liquid-fire above.
These were causing the photoswipe animation to start in the wrong place. Additional note. Ember wormhole and Liquid fire don't seem to work well together 👎 |
The polyfill wasn't compatible with the latest version of Ember - this has now been fixed. With a little help from the author of the in-element polyfill I managed to get in-element working - removing the need for ember-wormhole: I have a bug I'm still thinking about which is that the consuming application has to manually add the polyfill in:
I have the polyfill as a dependency rather than a dev dependency in ember-cli-photoswipe... and as such the polyfill installs with ember-cli-photoswipe... but then doesn't seem to get picked up by the browser. Manually installing the polyfill on the consuming application fixes the problem 😕 Unfortunately... in-element doesn't solve the Liquid-fire problem. 😬 |
No description provided.
The text was updated successfully, but these errors were encountered: