2016-12-26 3 views
0

In KonvaJS ist es möglich, alle Elemente in einer Gruppe zu drehen, wie:Iin KonvaJS, wie ändert man die Größe aller Elemente in einer Gruppe portionsweise?

(this bezieht sich auf das Gruppenobjekt)

this.rotation('30'); // rotates all elements inside the group by 30° 

Jetzt Wenn ich versuche, die Breite/Höhe, um die Größe wird es nicht funktionieren .

// trying to set the group width to 300px and make the grouped items inside increase proportionally. 

this.width(300); 

Antwort

1

ich es gefunden:

this.scale({x: '1.1', y: '1.1'}); 

In diesem Fall 1,1 Mittel 10% größer. Es betrifft alle Elemente in der Gruppe.

Verwandte Themen