I'm have a problem where all the codes scan to the same value. It feels like a problem with a closure, but I've done what I can to create new copy of the styling component...
let options = {
width: 200,
height: 200,
type: 'svg'
}
let range = [...Array(count).keys()]
range.forEach(labCtr => {
console.log(labels[labCtr])
const labelData = JSON.parse(JSON.stringify( labels[labCtr] ))
let optionsEach = Object.assign(options, {data: labelData})
let qrCode = new QRCodeStyling(optionsEach)
const el = document.getElementById('label' + labCtr)
qrCode.append(el)
})
Hi, thank you for this work, it's beautiful!
I'm have a problem where all the codes scan to the same value. It feels like a problem with a closure, but I've done what I can to create new copy of the styling component...
let options = { width: 200, height: 200, type: 'svg' } let range = [...Array(count).keys()] range.forEach(labCtr => { console.log(labels[labCtr]) const labelData = JSON.parse(JSON.stringify( labels[labCtr] )) let optionsEach = Object.assign(options, {data: labelData}) let qrCode = new QRCodeStyling(optionsEach) const el = document.getElementById('label' + labCtr) qrCode.append(el) })