feat:添加动效的中英文切换
This commit is contained in:
@@ -1053,6 +1053,16 @@ const cn = {
|
|||||||
fontColor:'字体颜色',
|
fontColor:'字体颜色',
|
||||||
align:'对齐',
|
align:'对齐',
|
||||||
opacity:'透明度',
|
opacity:'透明度',
|
||||||
|
bounce:"上下跳动",
|
||||||
|
shakeX:'左右跳动',
|
||||||
|
swing:'摇摆',
|
||||||
|
heartBeat:'心跳',
|
||||||
|
flash:'闪烁',
|
||||||
|
fade:'若隐若现',
|
||||||
|
flow:'水流',
|
||||||
|
beads:'水珠流动',
|
||||||
|
dot:'圆点',
|
||||||
|
comet:'彗星',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
date:{
|
date:{
|
||||||
|
|||||||
@@ -1058,6 +1058,16 @@ const en = {
|
|||||||
fontColor:'Font Color',
|
fontColor:'Font Color',
|
||||||
align:'Align',
|
align:'Align',
|
||||||
opacity:'Opacity',
|
opacity:'Opacity',
|
||||||
|
bounce:'bounce',
|
||||||
|
shakeX:'shakeX',
|
||||||
|
swing:'swing',
|
||||||
|
heartBeat:'heartBeat',
|
||||||
|
flash:'flash',
|
||||||
|
fade:'fade',
|
||||||
|
flow:'flow',
|
||||||
|
beads:'beads',
|
||||||
|
dot:'dot',
|
||||||
|
comet:'comet',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
date:{
|
date:{
|
||||||
|
|||||||
@@ -1137,40 +1137,36 @@
|
|||||||
{d:'M5 14 l85 0',fill:'#ffffff',stroke:"#000000",'stroke-width':"1",cx:"10",cy:"14",r:"5",name:'circle'},
|
{d:'M5 14 l85 0',fill:'#ffffff',stroke:"#000000",'stroke-width':"1",cx:"10",cy:"14",r:"5",name:'circle'},
|
||||||
],
|
],
|
||||||
lineAnimateOptions:[
|
lineAnimateOptions:[
|
||||||
{id:1,name:'水流'},
|
{id:1,name:this.$t("project.topology.flow")},
|
||||||
{id:'beads',name:'水珠流动'},
|
{id:'beads',name:this.$t("project.topology.beads")},
|
||||||
{id:'dot',name:'圆点'},
|
{id:'dot',name:this.$t("project.topology.dot")},
|
||||||
{id:'comet',name:'彗星'},
|
{id:'comet',name:this.$t("project.topology.comet")},
|
||||||
],
|
],
|
||||||
nodeAnimateOptions:[
|
nodeAnimateOptions:[
|
||||||
{
|
{
|
||||||
id:'upDown',
|
id:'upDown',
|
||||||
name:'上下跳动'
|
name:this.$t("project.topology.bounce")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:'leftRight',
|
id:'leftRight',
|
||||||
name:'左右跳动'
|
name:this.$t("project.topology.shakeX")
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:'heart',
|
id:'heart',
|
||||||
name:'心跳'
|
name:this.$t("project.topology.heartBeat")
|
||||||
},
|
|
||||||
{
|
|
||||||
id:'success',
|
|
||||||
name:'成功'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:'warning',
|
id:'warning',
|
||||||
name:'警告'
|
name:this.$t("project.topology.flash")
|
||||||
},
|
|
||||||
{
|
|
||||||
id:'error',
|
|
||||||
name:'错误'
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id:'show',
|
id:'show',
|
||||||
name:'炫耀'
|
name:this.$t("project.topology.swing")
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id:'fade',
|
||||||
|
name:this.$t("project.topology.fade")
|
||||||
|
}
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -502,6 +502,33 @@ export function onChangeAnimate(node,animateType,fillStyle,strokeStyle) {
|
|||||||
state: Node.cloneState(state)
|
state: Node.cloneState(state)
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
case 'fade':
|
||||||
|
state.strokeStyle = strokeStyle?strokeStyle: '#fa541c';
|
||||||
|
state.globalAlpha = 0.3;
|
||||||
|
node.animateFrames.push({
|
||||||
|
duration: 300,
|
||||||
|
linear: true,
|
||||||
|
state: Node.cloneState(state)
|
||||||
|
});
|
||||||
|
state.globalAlpha = 0.5;
|
||||||
|
node.animateFrames.push({
|
||||||
|
duration: 300,
|
||||||
|
linear: true,
|
||||||
|
state: Node.cloneState(state)
|
||||||
|
});
|
||||||
|
state.globalAlpha = 0.8;
|
||||||
|
node.animateFrames.push({
|
||||||
|
duration: 300,
|
||||||
|
linear: true,
|
||||||
|
state: Node.cloneState(state)
|
||||||
|
});
|
||||||
|
state.globalAlpha = 1;
|
||||||
|
node.animateFrames.push({
|
||||||
|
duration: 300,
|
||||||
|
linear: true,
|
||||||
|
state: Node.cloneState(state)
|
||||||
|
});
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
node.animatePlay=true;
|
node.animatePlay=true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user