1 year ago

#347379

test-img

glk

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

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

fabricjs

fabricjs2

0 Answers

Your Answer

Accepted video resources