Dragging around a group larger than screen (scene / layout) size

Hello.

I have a large group (5000 x 5000 px) that user may drag around to see some details.
I was able to make a solution creating a container and allow some limits of dragging.
But now, I need a "responsive" solution as I don't know how o create a "responsive" size of the container in relation to many Scene / Layout size (viewport). Only for desktop.

I have tested also these solutions, but they are ok for smaller areas than viewport container and images or there are some solutions using physics and they don't fit my concept.

Haloniko has asked for this but there was no solution, or at least I have not found it.

Can someone, please, indicate me a solution?

Thank you!


limits for dragging.zip (750.0 KB)

Did you try putting the "background' to be bounded by an even larger constraint box? basically it would be 15k x 15k?

However I can see that depending on how you make it flexible, you might just need a solution with the appropriate math to account for a changing viewport size.

1 Like

Thank you.
I have tried but I am not having a perfect match.

I guess that I will create one main screen 1920x1080, measure it only for that and fill the gap with some content that may be shown only for bigger screens.

Also, I found posts like this online, but I have no idea if it would be ok because I couldn't reproduce it correctly in Hype.

As a small note here - if you don't use Flexible Layout, Hype will actually constrain the On Drag to Control Element Position such that only half of the element is allowed outside the scene boundaries.

1 Like

Thank you @jonathan !
I will think about it.