View unanswered posts | View active topics It is currently 2018-10-22 2:22



This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
 如何实现Link的闪烁 
Author Message
新手上路

Joined: 2011-05-17 13:05
Posts: 37
Post 如何实现Link的闪烁
比如类似之前 svg 版本的 flowing 显示效果:
link.putLinkFlowing(true);
link.putLinkFlowingWidth(4);
link.putLinkFlowingColor(Color.black);
link.putLinkColor(Color.white);
并且能控制闪烁的时间间隔


2016-07-11 17:43
Profile
TWaver开发组
User avatar

Joined: 2016-05-08 15:32
Posts: 16
Post Re: 如何实现Link的闪烁
可以通过变换连线的颜色实现最简单的闪烁效果
Code:
    var link1 = new twaver.Link(from, to);
    this.box.add(link1);   
    setInterval(function(){
        if(link1.getStyle('link.color') == 'red'){
            link1.setStyle('link.color', 'blue');
        } else{
            link1.setStyle('link.color', 'red');
        }
        this.network.invalidateElementUIs();
    },500);


2016-07-12 14:57
Profile
Display posts from previous:  Sort by  
This topic is locked, you cannot edit posts or make further replies.   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


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