Flex 树放置指示器卡住了(编辑 2/4/10,几乎是一个完全不同的问题) [英] Flex tree droplocation indicator stuck (edit 2/4/10, almost a totaly different question)

查看:12
本文介绍了Flex 树放置指示器卡住了(编辑 2/4/10,几乎是一个完全不同的问题)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,我对此进行了更多研究,因此我将完全重新表述这个问题:
我有两棵树,我希望能够将项目从一棵树拖到另一棵树.在接收树中,我有一些允许或拒绝丢弃的逻辑.我正在使用本机光标反馈,如下所示:

OK I've got a little more research on this done so I'm going to totally rephrase the question:
I have two trees, I want to be able to drag items from one tree to the other. In the receiving tree I have some logic that allows or denys the drop. I am using the native cursor feedback Like this :

DragManager.showFeedback(DragManager.COPY);
DragManager.showFeedback(DragManager.NONE);

当逻辑确定 NONE 时,它会正确地拒绝该项目,但放置位置指示器会像屏幕截图中一样保持不变.

When the logic determines NONE it properly rejects the item except the drop position indicator sticks like in the screenshot.

我现在知道,在这种情况下,dragComplete 和 dragDrop 都不会被触发,所以我没有将代码放入其中的功能来清理它.那么我该如何监听这种拖拽拒绝呢?

I know now that neither dragComplete, nor dragDrop are being fired in this situation, so I have no function to put code into that would clean that up. So how can I listen for this drag rejection?

ScreenShot 显示放置后的应用

ScreenShot shows app After drop

替代文字 http://img687.imageshack.us/img687/2245/treeindicatorstuck.png

谢谢~迈克

附上我的另一个问题:how-do-i-detect-that-drag-and-drop-operation-ended 我们有一种方法可以触发事件,以便我们可以清理树控件.我在舞台上附加了一个事件监听器,这样当鼠标移动时(也许我会把它放在一个计时器上)它会不断检查是否 dragmanager.isdragging 如果不是它会触发 tree.hideDropFeedBack.这仍然引出了一个问题,什么事件正在改变 isDragging 布尔值,我该如何监听它?

PS with my other question: how-do-i-detect-that-drag-and-drop-operation-ended We have a way of getting an event to fire so we can clean up the tree control. I'm attaching an event listener to the stage so that as the mouse is moved (maybe I'll put it on a timer)it will constantly check if dragmanager.isdragging if it's not it will fire the tree.hideDropFeedBack. This still begs the question, what event is changing the isDragging Boolean and how do I listen for it?

推荐答案

需要调用tree.hideDropFeedback();event.target.hideDropFeedback();删除下降指示器.

You need to call tree.hideDropFeedback(); or event.target.hideDropFeedback(); to remove the drop indicators.

这篇关于Flex 树放置指示器卡住了(编辑 2/4/10,几乎是一个完全不同的问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆