View unanswered posts | View active topics It is currently 2018-08-20 9:22



Reply to topic  [ 4 posts ] 
 关于框选的监听 
Author Message
新手上路

Joined: 2017-10-25 14:53
Posts: 48
Post 关于框选的监听
框选(按着ctrl 框选网元)结束有监听事件吗?


2018-05-07 20:02
Profile
TWaver开发组
User avatar

Joined: 2018-04-16 16:11
Posts: 66
Post Re: 关于框选的监听
您好,感谢您使用我们的产品 grin

框选结束的时候,有监听事件的。您可以这样判断:

Code:
network.addInteractionListener(function(e){
    if(e.kind === 'selectEnd'){
        console.log(e);
     }
});


具体用法,请参考我们的api,地址为:http://doc.servasoft.com/uploads/twaver-html5-5.0.3-api/classes/twaver.vector.Network.html#method_twaver.controls.ViewBase.addInteractionListener


2018-05-07 21:03
Profile
新手上路

Joined: 2018-05-07 11:06
Posts: 8
Post Re: 请问楼上,singleSelection模式下,怎样实现按着ctrl,可以先后选择两个元素
singleSelection模式下,按着ctrl 的情况下,怎样实现鼠标多选(确切的说是选两个,后面需要对二者进行比较)


2018-05-14 23:04
Profile
TWaver开发组
User avatar

Joined: 2018-04-16 16:11
Posts: 66
Post Re: 关于框选的监听
litingyuki@163.com wrote:
singleSelection模式下,按着ctrl 的情况下,怎样实现鼠标多选(确切的说是选两个,后面需要对二者进行比较)


您好,您是说在单选模式下,按着ctrl也无法进行多选吗?

如果是这样,我建议您可以监听键盘ctrl键按下事件,当按下ctrl时候,开启多选模式,然后进行多选。在选择完成以后,再调回单选模式即可。


2018-05-15 15:06
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 5 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: