-
Notifications
You must be signed in to change notification settings - Fork 18
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
How can I apply this into nuxt.js? #2
Comments
|
Yup, looks like you found it. This plugin was written with client-side code in mind, not server-side. If you replace the |
Hi, I am also using nuxt.js it worked fine in desktop but I would like to apply pinch to zoom in/out in mobile. Is there a way on how to apply it on nuxt.js? PS: I didn't notice that I am the same person that opens the issue. hehe, pardon me. |
I'm not sure I understand that last question...? |
I'm running into the problem of using this with nuxt.js as well. It looks like the line identified above is part of the problem but the main problem is that during serverside rendering neither window not document are defined, both feature quite heavily in the code so fixing the one line doesn't help. Also as window is not defined changing the line to |
I'll have to try to create a basic nuxt project using this package to see what can be done. But yeah, |
Of course, there's the solution to entierely port |
It might be possible to add a v-if=process.client into calling of the svgpanzoom element within the template so it only renders client side, this probably wouldn't work but it's worth checking.
I'll admit that I resolved my issue by adding a v-on:zoom (I think, it was something like this but I'm currently not at work and my brain has switched off) to a normal svg and called a zoom function instead of using svgpanzoom
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: Yanick Champoux <[email protected]>
Sent: Saturday, June 8, 2019 5:04:08 PM
To: yanick/vue-svg-pan-zoom
Cc: Shorter, Tom; Comment
Subject: Re: [yanick/vue-svg-pan-zoom] How can I apply this into nuxt.js? (#2)
Of course, there's the solution to entierely port svg-pan-zoom in vue. Shouldn't be too bad, but that'd require some serious tuits... :-P
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fyanick%2Fvue-svg-pan-zoom%2Fissues%2F2%3Femail_source%3Dnotifications%26email_token%3DAF7SMQ3VFDZRY5Y72ZDUGFLPZPJ7RA5CNFSM4GL5H5PKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXHXNTQ%23issuecomment-500135630&data=02%7C01%7Cts339%40leicester.ac.uk%7C2e8357f0569b4be1fd0808d6ec2af116%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C636956066521243339&sdata=DoGxTWcb9AknkkoBd8rzfrG4X9N0DGWaIsaUaxWYnMg%3D&reserved=0>, or mute the thread<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAF7SMQ7EBD7SWNHGH4WPHV3PZPJ7RANCNFSM4GL5H5PA&data=02%7C01%7Cts339%40leicester.ac.uk%7C2e8357f0569b4be1fd0808d6ec2af116%7Caebecd6a31d44b0195ce8274afe853d9%7C0%7C0%7C636956066521253343&sdata=6eQo13Of%2F8q7fdsxZg1DtXaZOMdvmVfYNwsFDmMSbDE%3D&reserved=0>.
|
I follow this code in the documentation but there seems to be a problem. I am using Nuxt.js is there a conflict?
I get this error
ReferenceError
window is not defined
Can you help me? I'm stack
The text was updated successfully, but these errors were encountered: