Drag and Drop

CAn you send me a link pls

And how can i make this widget part of it?

Add the waypoint to the canvas.


i thought its already added

Are you using this canvas to perform the zooming? Probably not.

A lot would also depend on how the zoom/pan is being done.

its inside my main widget, i need add to the canvas in this area?

Correct me if I’m wrong but, to me, it seems that you’re just resizing an image rather than apply scale to the canvas that holds the icons:

The idea is to have a parent container (CanvasToScaleAndMove):

image

This container holds everything that needs to be moved and scaled inside and you transform that container. This will, in turn, transform everything within.

I think you’re right, so i need to wrap this 2 widget in canvas and then replace it in the graph?

To follow up, with a setup like above, the most basic zoom in/out could be achieved like so:

You will, ofc, need more script to make a full feature - the detail are in the thread I posted.

I think you could get away with scaling the WBP_BigMap. Unless it also contains other elements that should not be resized.

it works, but screwed up my actor position(

and see what happens when i move it left or right

And how are you moving it?

The calculations revolve around hardcoded numbers. If you scale or move things around, you need to account for those offsets. It’s a whole bunch of math.

So i need to change this


or i need to create a new function with the math?

with the scrollbox

I am not sure which of those elements you’re planning on moving and scaling:

image

But you’ll need to organise logically in such a way that the scroll boxes are excluded from those operations. I am assuming you do not want them moved / scaled as well.


I remember trying doing something like this with nested scroll boxes but couldn’t hack it back then. It was fairly long ago, though - perhaps it can be done.

I move and scale this widget WBP_GlobalMap and i have WBP_Main, “WBP_GlobalMap” is child of WBP_Main

Sorry, I can’t figure out what’s what. You seem to have so many things nested here…


I move and scale this widget WBP_GlobalMap

But this widget contains the scroll boxes? How are you expecting it to work? The elements that move it are the elements moving it? I am confused. But that would explain the wobble we saw in the anim. I was wondering what caused that, actually. Thought you implemented a fancy interpolated spring or something.

image

Judging by the above, you should be moving and scaling MapCanvas. I am unsure how to set it up with scrollboxes, they have offsets that I’ve always found somewhat difficult to work with.