View unanswered posts | View active topics It is currently 2020-08-07 11:58



Reply to topic  [ 3 posts ] 
 请问如何监听反序列化完成后,触发事件 
Author Message
新手上路

Joined: 2018-03-27 9:47
Posts: 26
Post 请问如何监听反序列化完成后,触发事件
如图:
Attachment:
微信截图_20200731145857.png
微信截图_20200731145857.png [ 10.3 KiB | Viewed 46 times ]

需求是,想在反序列化完成后, 调用 zoomOverview 让所有元素可见


2020-07-31 15:01
Profile
TWaver开发组
User avatar

Joined: 2019-04-23 11:02
Posts: 88
Post Re: 请问如何监听反序列化完成后,触发事件
this.network.zoomOverview处替换为:
Code:
        var callback = function (e) {
          if (e.kind === 'validateEnd') {
            network.removeViewListener(callback);
            network.zoomOverview();
          }
        };
        network.addViewListener(callback);


2020-07-31 16:58
Profile
新手上路

Joined: 2018-03-27 9:47
Posts: 26
Post Re: 请问如何监听反序列化完成后,触发事件
skm_mks wrote:
this.network.zoomOverview处替换为:
Code:
        var callback = function (e) {
          if (e.kind === 'validateEnd') {
            network.removeViewListener(callback);
            network.zoomOverview();
          }
        };
        network.addViewListener(callback);

可以了,谢谢


2020-08-03 9:46
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

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