[英]How can I display size on the Rect shape by fabricjs?
為了獲得選定的或活動的圖像大小,我們可以使用下面的代碼
// for getting active objects, here its Rectangle
this.selectedObj= this.canvas.getActiveObject().toObject().objects;
// if there is one object we get the resultant values like this.
var width = this.selectedData.objects[0].width;
var height = this.selectedData.objects[0].height;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.