Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to find the drop position for FlowLayout?

    With the Layout class I can get the position of the drop by calling layout.getDropPosition().

    Now I’m trying to get the position of a drop for FlowLayout. FlowLayout does not have the getDropPosition() method.

    How can I get the position of a drop for FlowLayout?

    #2
    At the moment, there is no single public API that gives you the drop position. If you need it, you currently have to calculate it from the mouse position, tile sizes, margins, etc.

    If you do indeed need to calculate this position, you can take a look at TileLayout.js findIndexForCoord() as an inspiration for your own implementation.

    In the meantime, we've taken a note that it could be useful to have a simple getDropPosition() API in a future version.

    Comment

    Working...
    X