Threepenny-GUI: Drag'n'Drop - access to DragData

I'm currently trying to access an element of a DragDatadraggable element when called on UI.drop. I have something like this:

tile <- UI.new
    # set UI.draggable True
    # set UI.dragData (show player)

field <- UI.new
    # set UI.droppable True

on UI.drop field $ \_ -> do
    -- How to receive the DragData here?

Can someone help me? Thanks in advance!

Hello Moritz

+4
source share
1 answer

I understood:

on UI.drop field $ \dragData -> do
    d <- read dragData

Maybe this helps someone else;)

+3
source

Source: https://habr.com/ru/post/1684529/


All Articles