Threepenny - GUI:拖放 - 访问 DragData

Threepenny-GUI: Drag'n'Drop - Access DragData

我目前正在努力在调用 on UI.drop 时访问被拖动元素的 DragData。我有这样的东西:

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?

有人可以帮助我吗?提前致谢!

您好, 莫里茨

我知道了:

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

也许对其他人有帮助 ;)