-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请教:除了ground、tree、sky,还能自己添加自定义层吗? #282
Comments
可以添加,切换一下示例代码的tab标签,有手动创建的示例,或者直接看api: https://www.leaferjs.com/ui/reference/display/App.html#%E5%85%B3%E9%94%AE%E6%96%B9%E6%B3%95 |
app.ground = new Leafer({ type: 'draw' }) 根据文档试了一下,新添加的层取名app.xxx吗?能运行,但是会报ts错误 |
创建一个xxx.d.ts文件: import "leafer-editor";
declare module "leafer-editor" {
import { ILeafer } from "leafer-editor";
interface App {
xxx: ILeafer;
}
} |
好的 谢谢!另外问一下:
设置不同的LeaferType有什么实际区别吗 |
当自定义新增的 new Leafer({width:xxx,height:xxx}) 设置了width和height 就不渲染在APP里了 为什么? |
如果能的话,如何添加?
The text was updated successfully, but these errors were encountered: