leaferjs / leafer-ui

一款好用的 Canvas 引擎,革新的开发体验,用于高效绘图 、UI 交互、图形编辑。A user-friendly Canvas engine with a revolutionary development experience, for efficient drawing, UI interactions, and graphic editing.
https://www.leaferjs.com
MIT License
2.47k stars 85 forks source link

leafer-ui 文档错误修复 #126

Closed a-boom closed 6 months ago

a-boom commented 7 months ago

传入 canvasId 会报错,如下图:

image image

实测传入 canvas 实例,可以正常 init

const query = wx.createSelectorQuery();
        query.select("#leafer").fields({
            size: true,
            node: true
        }).exec(res => {
            const canvas = res[0].node
            const leafer = new Leafer({
                view: canvas,
                eventer: this
            })

            const rect = new Rect({
                x: 100,
                y: 100,
                width: 100,
                height: 100,
                fill: '#32cd79',
                draggable: true,
            })

            leafer.add(rect)
        })
leaferjs commented 7 months ago

收到,感谢反馈~

leaferjs commented 6 months ago

问题已修复~