View unanswered posts | View active topics It is currently 2020-05-26 9:11



This topic is locked, you cannot edit posts or make further replies.  [ 6 posts ] 
 link连线合并 
Author Message
新手上路

Joined: 2013-08-22 14:40
Posts: 41
Post link连线合并
两个Group ,group1与group2, 中间有多条线,当两个网元都合并时,双击合并的连线默认的是哪条,可不可以都合并时不做事件处理
(不能判断group的状态,group太多了,可不可以判断连线的状态)。


2015-03-03 17:42
Profile
TWaver开发组
User avatar

Joined: 2014-02-11 8:59
Posts: 575
Post Re: link连线合并
关于link捆绑的问题可以参考链接:
http://twaver.servasoft.com/forum/viewtopic.php?f=17&t=739&p=2412&hilit=bundle 代理#p2412
合并时不做任何处理?不是很明白啥意思,可详解?


2015-03-04 9:28
Profile
新手上路

Joined: 2013-08-22 14:40
Posts: 41
Post Re: link连线合并
两个分组中的多个网元有连线,当两个网元都合并时,就变成一条线路,我如何判断是不是合并成一条线路,或者合并后不触发任何事件,现在合并后是触发默认的第一条。


2015-03-04 10:27
Profile
TWaver开发组
User avatar

Joined: 2014-02-11 8:59
Posts: 575
Post Re: link连线合并
twaver内部并没有开关直接关闭这个监听事件,可以在监听双击时间的时候,判断如果双击的是link,则可以执行Link#ReverseBundleExpanded()方法。这样可以达到同样效果。


2015-03-04 16:04
Profile
新手上路

Joined: 2013-08-22 14:40
Posts: 41
Post Re: link连线合并
如何判断link是一组还是一条,判断link的Bundle状态,另外ReverseBundleExpanded方法是不是就是将一组link展开。


2015-03-04 19:39
Profile
TWaver开发组
User avatar

Joined: 2014-02-11 8:59
Posts: 575
Post Re: link连线合并
翻转link的bundle状态
Code:
network.Interaction += e =>
            {
                if (e.Kind == InteractionEvent.DOUBLE_CLICK_ELEMENT) {
                    if (e.Element is Link) {
                        Link l = (Link)e.Element;
                        l.ReverseBundleExpanded();
                    }
                }
            };


2015-03-05 9:34
Profile
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron