-
Notifications
You must be signed in to change notification settings - Fork 637
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 to change the Margin of Shepherd Step without using Offset and FloatingUIOption #2507
Comments
Even if its possible to create a dummy offset object inline in the javascript method that would be great as well. This is for legacy project with vanilla javascript libraries pulled as a file and no NPM or CDN. |
The offsets are part of floating UI, so you'll have to use their |
Thanks for your response @RobbieTheWagner , Let me reachout to floatingUI library or if anyone have a sample example that should also help. Even if it means to have it as part of the window object like window.offset. I can use this in our code during the site tour as well. We are unable to use the import as mentioned earlier, Working on Legacy project with plain vanilla JS libraries. Even CDN are downloaded into specific folders for shepherd.js to use it for site tour. |
I was able to bring CDN file into our page using CDN: https://cdn.jsdelivr.net/npm/@floating-ui/[email protected]/dist/floating-ui.core.umd.js However the floatingUIOption is not affecting anything on the dialog. Below is the code. If we are not using Import. Is there a way we can relate or connect the offset object with the Step appearing on the screen somehow ? (Sorry for the trouble if its confusing. )
THe page shows module as mentioned below |
I'm having a similar issue to this. @mvksages did you ever find a workaround for the floatingUIOption offset not working? |
In the docs, I found the reference should be |
Its not possible to have a workaround. Finally I had to try a different library like https://driverjs.com/ |
Why not just import |
What about folks using the CDN option, how would we do it? |
@lonix1 you should still be able to do it with |
I was trying to change the margin:0px to 20px from Tour.When.show() method - however it does not reflect. We are using Shepherd.js in a legacy project which does not need additional offset object for making the margin change.
Is there anyway I can achieve this ? Below is the example code
The text was updated successfully, but these errors were encountered: