Open a-boom opened 5 months ago
const json = box.toJSON();
let rectList = json.children;
rectList = rectList.map(item => {
item.stroke = undefined
return item
})
const leaferSave = new Leafer({
width: this.data.mainBoxSize,
height: this.data.mainBoxSize
}, json)
let nowTime = new Date().getTime()
leaferSave.export(`pixelVerse_${nowTime}.png`).then(res => {
console.log(res)
wx.showToast({
title: '保存成功',
})
})
已经确定就是 export 操作之后导致原来的 leafer 无法交互
之前的版本的leafer传入json会有这个问题,最新版已经修复了
引入的已经是最新发布的版本了
const json = box.toJSON();
let rectList = json.children;
rectList = rectList.map(item => {
item.stroke = undefined
return item
})
let leaferSave = new Leafer({
width: this.data.mainBoxSize,
height: this.data.mainBoxSize
})
const group = new Group(json)
leaferSave.add(group)
let nowTime = new Date().getTime()
leaferSave.export(`custom_${nowTime}.png`,{}).then(res => {
wx.showToast({
title: '保存成功',
})
})
通过注释代码排查 只要我创建了第二个 leafer(离屏画布) 就会导致页面上的 canvans 所创建的 leafer 无法操作
收到,谢谢反馈~, 后面修复下
得上复现代码才能排查到原因