Jump to content
Search Community

InertiaPlugin and problem with overflow x

hellodude.it test
Moderator Tag

Recommended Posts

Hi,
I'm using InertiaPlugin to have draggable elements and it's great!
The only problem I have is being able to have the image go out of bounds but not "move" the content of the site (see attached video).
I noticed that if I set "overflow: clip" to the parent it works, while "overflow: hidden" doesn't solve the problem.
Is there an alternative to "overflow: clip" as it has almost no compatibility?

 

Thank you,

a.

 

Link to comment
Share on other sites

4 hours ago, andrea_pergola said:

Can you explain the logic of this intervention?

Make sure the container that is only the width of the screen has position relative and overflow hidden.

 

3 hours ago, andrea_pergola said:

I updated the codepen to better represent my problem.

Whenever you share demos to these forums, please use the "fork" button on CodePen so that context is not lost in the previous times that you shared the demo :) 

 

If your goal is to keep it inside of the bounds of the parent, why not use the bounds property?

See the Pen dyOJPNa by GreenSock (@GreenSock) on CodePen

Link to comment
Share on other sites

13 minutes ago, ZachSaucier said:

Is this what you're going for?

 

See the Pen

See the Pen ZEBvLwB?editors=0010 by GreenSock (@GreenSock) on CodePen

by GreenSock (@GreenSock) on CodePen

 


Yeah, sort of.
The only problem with this codepen is that the draggable images have to go over all the content in the Y axis, whereas now they go overflow-y hidden.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...