Skip to content
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

Does not work when used with Quasar Framework #46

Open
perochak opened this issue Oct 2, 2019 · 8 comments
Open

Does not work when used with Quasar Framework #46

perochak opened this issue Oct 2, 2019 · 8 comments

Comments

@perochak
Copy link

perochak commented Oct 2, 2019

Hey

I have tried to use it with Quasar framework but image does not display. Moverover when items/slides are assigned/updated dynamically i.e. via ajax it does not work too

@ph7jack
Copy link

ph7jack commented Oct 29, 2019

use <q-no-ssr></q-no-ssr>

@perochak
Copy link
Author

can you please give full guide of it?

@mapkbalaji
Copy link

@PH7-Jack I ve tried using but no use. The image is displayed, but on hovering, it's not displaying the zooming pane.

@mapkbalaji
Copy link

@perochak Did you have any success in using the component with Quasar?

@perochak
Copy link
Author

no success

@raukaute
Copy link

I was facing a similar problem trying to make it work with Vue SSR, i.e. image as showing but no zoom on hover, and the overall positioning of the elements incorrect. The product zoomer injects the relevant styles (based on the image input) inline once the 'load' event is fired on window. Don't know the whole in depth explanation, but this event is never fired inside a component in a Vue, Vue-Router setup. Hence, the inline-style injection never happens. (Check the DOM, when working correctly you should have style-attributes on the relevant elements (base-container etc.)
In app.bundle.js change window.addEventListener("load") to t.$nextTick( ) and the whole thing should work (at least in my case it did).
Make sure to do some further testing, which I didn't. In the end I built my own component based on Drift that better suited my usecase.

Good luck!

@perochak
Copy link
Author

@BobbySpoon Can you please share your solution

@raukaute
Copy link

@perochak I'll try to set something up, just very busy these days. Look into the docs here https://github.com/imgix/drift
It's fairly easy, just wrap a vue component round it. It should work with .
When importing the module in the server-render phase, it will get stuck in lib/ZoomPane.js (no dcument in Node...). I just wrapped the block in conditional, i.e.
if (typeof window !== 'undefined') {
/* lines 22 - 23 */
}

Hope that helps for now. Let me know if you run into any further complications.

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants