Skip to content

Use top left instead of transform? #684

Open

Description

@feresr

Is it possible to use the top/left css properties instead of transform?

...or alternatively, keep using transform for dragging but then set reset its value on onDragStopped (and move the new position values to top/left) for performance?

Activity

  1. abrehamgezahegn commented on Dec 1, 2022

    @abrehamgezahegn

    Looking for the same behavior. Zoom amount of the window affects the position set by transform.

  2. twinkle77 commented on Jun 1, 2023

    @twinkle77

    +1

  3. derwaldgeist commented on Dec 10, 2023

    @derwaldgeist

    Having the same problem. I would like to store the new hotspot position persistently when drag stopped. This will cause the hotspot to be rendered at a new left/top position (the end point of the drop). However, since the library keeps the transform, the translation is being added to this position.

    It would be super nice if there was an option to reset the transform to translate(0,0) on dragStop.

  4. Crashkurs commented on Jan 27, 2024

    @Crashkurs

    Got the same problem with RTK Query, having the position of the draggable div stored in a database that gets updated once the dragging finishes, which invalidates the cache and repositions the div with its new left/top.
    After changed object arrives in the component, the transform stays, which doubles the movement made.

  5. Talha345 commented on Apr 6, 2024

    @Talha345

    +1

  6. acherkashin commented on Jul 24, 2024

    @acherkashin

    I'm interested in it as well, because monaco editor suggestion layer is not positioned correctly when parent element is positioned with transform

    microsoft/monaco-editor#4580

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions