[备忘] flex tree DropIndicator and scroller

I use 3rd party spark tree instead of MX tree, and met an issue: when you dragover an item to the tree target, if the tree has more items and show the scroller, you will find the program enter into a loop of calling dragover event.

protected function tree_dragOverHandler(event:DragEvent):void
{
	var myDropTarget:Tree=Tree(event.currentTarget);
	var pos:DropLocation=this.volume.layout.calculateDropLocation(event);

	DragManager.showFeedback(DragManager.MOVE);
	myDropTarget.createDropIndicator();

	//here it cause reEnter into tree_dragOverHandler event
	myDropTarget.layout.showDropIndicator(pos); 
}

How to resolve the issue: just setting the target tree's useVirtualLayout property as "false".

:)

smithfox | Wednesday 02 March 2011 at 1:25 pm | | UI        | Used tags: , , , ,

two comments

cases for iPhone 6 plus

Realistic colours, superb brightness and wide viewing angles all catch the eye making it one of the best smartphones panels on the market. Its 401 ppi (pixels per inch) density is beaten by 2k rivals, but you will never notice this in real world use and it remains far above Apple’s own 326ppi ‘Retina Display’ threshold.

cases for iPhone 6 plus, (URL) - 16-01-’15 14:54
Louis Vuitton iPhone 6S Cases

There are a few unique features on the Lumia 950. The device has a USB Type-C connector, which should allow for faster data transfer and charging.

Louis Vuitton iPhone 6S Cases, (URL) - 08-10-’15 20:03
(optional field)
(optional field)
为阻止垃圾广告, 请在提交评论前, 回答一个简单问题(Please answer an simple question)
Remember personal info?
Notify
Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.