View unanswered posts | View active topics It is currently 2020-08-04 10:31



Reply to topic  [ 4 posts ] 
 setLimitViewInCanvas函数问题 
Author Message
新手上路

Joined: 2020-06-18 7:19
Posts: 23
Post setLimitViewInCanvas函数问题
setLimitViewInCanvas我看文档里面写的是:设置是否限制左上角;
使用这个方法 network.setLimitViewInCanvas(true); 以后,画布不仅限制了左上角,还限制了右下角;我只想让限制左上角,保证节点不出现负值坐标,但是不想限制右下角!有没有什么办法?请教!


2020-07-13 19:16
Profile
TWaver开发组
User avatar

Joined: 2019-04-23 11:02
Posts: 88
Post Re: setLimitViewInCanvas函数问题
试试使用这个:
Code:
network.setLimitElementInPositiveLocation(true)


2020-07-14 9:53
Profile
新手上路

Joined: 2020-06-18 7:19
Posts: 23
Post Re: setLimitViewInCanvas函数问题
setLimitElementInPositiveLocation这个方法我也在代码里面增加了,确实限制了节点不能被拖动到负值的区域,只是现在setLimitViewInCanvas方法限制了画布的大小,不能往右下角扩大,有没有解决方法?


2020-07-14 17:17
Profile
TWaver开发组
User avatar

Joined: 2019-04-23 11:02
Posts: 88
Post Re: setLimitViewInCanvas函数问题
setLimitViewInCanvas机制就是这样的,网元都在可视范围内就不能拖动了。可以不用吗


2020-07-15 17:30
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

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