1

gnome-shell で既存のアクターをアニメーション化しようとしています。いくつかの方法を試しましたが、毎回アクターの位置を変更できますが、アクターのサイズを変更することはできません。

これは私が試した方法の 1 つで、アクターは位置を変更していますが、サイズは変更していません。

Tweener.addTween(boxa,
{  x1: targetX,
    y1: targetY,
   x2: targetX+targetWidth,
   y2: targetY+targetHeight,
   time: 2,
   transition: "easeOutElastic",
   onUpdate: function (_actor) { _actor.set_position(this.x1, this.y1); 
                                 _actor.set_width(this.x2 - this.x1); 
                                 _actor.set_height(this.y2 - this.y1); 
                                 log("TWEENER x1:" + this.x1 + " x2:"+ this.x2 + " y1:"+ this.y1 + " y2:"+ this.y2)},
   onUpdateParams: [actor],
   onComplete: function (_actor) {shellwm.completed_maximize(_actor)},
   onCompleteParams: [actor]
});

set_width と set_hight を直接使用しても成功しませんでしたが、エラーはありません。

4

0 に答える 0