zrender animate 无法针对rotation做动画操作,有遇到过这种情况的朋友吗
发布于 4 年前 作者 xumjs8623 3089 次浏览 来自 问答
粉丝福利 : 关注VUE中文社区公众号,回复视频领取粉丝福利
	this.zr = zrender.init(this.$refs.finger);
    let circle1 = new zrender.Rect({
      rotation: 0,
      origin: [80, 80],
      shape: {
        x: 30,
        y: 30,
        width: 100,
        height: 100
      },
      style: {
        fill: "#FF6EBE",
        stroke: "#FF6EBE"
      },
      silent: true
    });
    circle1.animateTo({
      rotation: Math.PI * 2
    }, 1000, 0)
    circle1.animate('rotation',true)
      .when(1000, 2)
      .start()
    this.zr.add(circle1);

第一个 animateTo 可以正常运行,第二个animate就会报错 image.png

回到顶部