View unanswered posts | View active topics It is currently 2020-10-21 18:09



Reply to topic  [ 2 posts ] 
 如何获取group展开状态下占据的空间 
Author Message
新手上路

Joined: 2020-06-18 7:19
Posts: 24
Post 如何获取group展开状态下占据的空间
请教:如何获取group展开状态下占据的空间? getRect ()方法获取的宽高值不对;


2020-09-10 16:38
Profile
TWaver开发组
User avatar

Joined: 2019-04-23 11:02
Posts: 99
Post Re: 如何获取group展开状态下占据的空间
必须等待绘图完成才能获取,除非自己可以根据提前拿到的子网元的位置计算。
获取方法
Code:
   var gu = network.getElementUI(group);
    function fn (e) {
      if (e.kind == 'validateEnd') {
        console.log('validateEnd');
        console.log(gu.getViewRect())
        network.removeViewListener(fn)
      }
    }
    network.addViewListener(fn);


2020-09-10 18:04
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

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