|
|
@@ -19,14 +19,18 @@ export const widgets = Object.freeze([
|
|
|
widgetMedia,
|
|
|
widgetText,
|
|
|
widgetMarquee,
|
|
|
- widgetImage,
|
|
|
- widgetVideo,
|
|
|
widgetTime,
|
|
|
__STAGING__ ? widgetWeather : null,
|
|
|
widgetWeb,
|
|
|
widgetLive
|
|
|
].filter(Boolean))
|
|
|
|
|
|
+const supportWidgets = Object.freeze([
|
|
|
+ ...widgets,
|
|
|
+ widgetImage,
|
|
|
+ widgetVideo
|
|
|
+].filter(Boolean))
|
|
|
+
|
|
|
let scale = null
|
|
|
export function create (node) {
|
|
|
const canvasDefaults = widgetCanvas.defaults()
|
|
|
@@ -86,7 +90,7 @@ export function copy ({ id, ...node }) {
|
|
|
}
|
|
|
|
|
|
function getWidget (type) {
|
|
|
- return type && widgets.find(widget => widget.type === type) || {}
|
|
|
+ return type && supportWidgets.find(widget => widget.type === type) || {}
|
|
|
}
|
|
|
|
|
|
export function getIcon (type) {
|