Threepenny-GUI:拖放 - 访问DragData

4

我目前在获取拖动元素的DragData时遇到了困难,当调用on UI.drop时。我有如下代码:

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?

有人能帮我吗?先谢谢了!

问候, Moritz

1个回答

3

我明白了:

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

也许对其他人有所帮助;)

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接