You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kangax edited this page May 30, 2011
·
25 revisions
Q: How can I reference existing objects on canvas?
A: canvas.getObjects() returns an array of all objects on canvas; canvas.item(n) returns n-th object on canvas (where indexing is associated with z-order)
Q: How can I change object's properties?
A: Using fabric.Object#set method (e.g.: rect.set('width', 100).set('height', 50) or rect.set({ width: 100, height: 50 }))