`How to get the relative position of the sub item contained in 'activeselection' in fabricjs'?

76 Views Asked by At

Fabricjs version: v4.6.0

enter image description here

const selection = new fabric.ActiveSelection(objs, { canvas })
const childs = selection.getObjects()
console.log('first child position:', childs[0].left, childs[1].top) // -120, -243.5

The 'left' or 'top' I get is negative, which seems to be wrong

0

There are 0 best solutions below