You can compare the instance’s sizing to the source’s sizing.
let doc = sketch.getSelectedDocument()
let selection = doc.selectedLayers.layers[0]
let instanceWidth = selection.frame.width
let instanceHeight = selection.frame.height
let source = selection.master
let sourceWidth = source.frame.width
let sourceHeight = source.frame.height
let scaleWidth = instanceWidth / sourceWidth
let scaleHeight = instanceHeight / sourceHeight
console.log(scaleWidth,scaleHeight)
If the scaleWidth
and scaleHeight
are the same then you know it has been evenly scaled down or up.