Maqetta8.0.1 自定义插件开发步骤

新一个版本的Maqetta发布了,最新的版本是8,由于自从版本7,Maqetta的架构发生了很大的变化,其和Orion进行了集成,因此一些实现原理等发生了变化,这里对其自定义插件的开发方式进行一个简单的说明。

1、复制一个Maqetta8现有的一个插件进行修改,比如maqetta.shapes、maqetta.clipart等,并根据自己的实际需要进行仔细修改;

2、修改widgetPalette.json(重点),其位于davinci.releng/orion/builder/siteConfig/目录下

首先,在"defs"里定义自己的widgets库所要显示的插件,如:

"$CustomUISection":{

"id":"CustomUI",

"name": "Custom UI",

            "iconBase64": "data:image/gif;base64,R0lGODlhEAAQAKIAAL+/v5aWlmNjYzMzMxwcHBYWFv///wAAACH5BAEAAAYALAAAAAAQABAAAAMgaLrc/jBKFsBcg9g7iuaFZwlhaZrD1Ikqq35Xdc10PScAOw==",

"includes":[

"Message",

"Share",

"WeatherButton",

"WeatherInput",

"WeatherResult"

]

},

还可以根据实际需要,对同一个widgets库下的widget进行分类显示

其次,定义自己的插件要在那些应用程序里显示,如

"$mobileSections":[

"$ViewsSection",

"$HeadingSection",

"$ListsSection",

"$ControlsSection",

"$ContainersSection",

"$HTMLSection",

"$ClipartSection",

"$DrawingToolsSection",

"$DrawingNewToolsSection",

"$AppOtherSection"

],

"$desktopSections":[

"$ContainersSection",

"$ControlsSection",

"$ViewsSection",

"$HeadingSection",

"$ListsSection",

"$HTMLSection",

"$ClipartSection",

"$DrawingToolsSection",

"$DrawingNewToolsSection",

"$CustomUISection",

"$AppOtherSection"

],

最后,在"presets"定义自己的自定义widget要显示在开发界面上的组件库,如

"desktop":{

"collections":[

{ "id":"dijit", "show":true },

{ "id":"dojoxmobile", "show":false },

{ "id":"html", "show":true },

{ "id":"clipart", "show":true },

{ "id":"shapesnew", "show":true },

{ "id":"customui", "show":true },

{ "id":"shapes", "show":true }

],

"sections":"$desktopSections"

},

3、把自定义的组件加入到maqetta.orion.feature插件里的feature.xml文件中

至此,Maqetta8里的自定义插件顺利完成,启动后,就可以在界面看到自定义的widgets

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值