daybrush / moveable

Moveable! Draggable! Resizable! Scalable! Rotatable! Warpable! Pinchable! Groupable! Snappable!
https://daybrush.com/moveable/
MIT License
9.92k stars 612 forks source link

can i reset moveable's coordinate? #653

Open khuntoriia opened 2 years ago

khuntoriia commented 2 years ago

Environments

Description

I have an iframe in page, but the moveable position goes wrong when the target's postion is "fixed". can i reset moveable's coordinate to iframe's point

image
daybrush commented 2 years ago

@khuntoriia

What will be the markup html structure and css?

Or is the transform hanging on the container or its parent?

daybrush commented 2 years ago

@khuntoriia

moveable's new version is released. Try it again.

khuntoriia commented 2 years ago

@khuntoriia

What will be the markup html structure and css?

Or is the transform hanging on the container or its parent?

hello, the html structure is like this:

image

the iframe which is embedded in a page has some components and the "mask" div cover it, has the same size of the iframe, and moveable is under the "mask". the problem I have is when a component is fixed position, it's position is related to iframe window. but the same position css apply to moveable,it changes to related to browser, so when I want to select the component, the deviation occures.

daybrush commented 2 years ago

@khuntoriia

What is the target set in moveable?

iframe element?

Is it an element inside an iframe?

daybrush commented 2 years ago

And a moveable must not belong to a container with a transform.

The moveable must not have a higher depth than the target.