diff --git a/src/client/widgets/common/widget.js b/src/client/widgets/common/widget.js index c34b2254..796da493 100644 --- a/src/client/widgets/common/widget.js +++ b/src/client/widgets/common/widget.js @@ -6,7 +6,6 @@ var EventEmitter = require('../../events/event-emitter'), Vm = require('../vm'), vm = new Vm(), scopeCss = require('scope-css'), - {iconify} = require('../../ui/utils'), resize = require('../../events/resize'), OscReceiver = require('./osc-receiver'), {deepCopy, deepEqual, isJSON} = require('../../utils'), @@ -52,11 +51,6 @@ class Widget extends EventEmitter { type: {type: 'string', value: 'auto', help: ''}, id: {type: 'string', value: 'auto', help: 'Widgets sharing the same `id` will act as clones and update each other\'s value(s) without sending extra osc messages.' }, - // label: {type: 'string|boolean', value: 'auto', help: [ - // 'Set to `false` to hide completely', - // '- Insert icons using the prefix ^ followed by the icon\'s name : `^play`, `^pause`, etc (see https://fontawesome.com/icons?d=gallery&s=solid&m=free)', - // '- Icons can be transformed with the following suffixes: `.flip-[horizontal|vertical|both]`, `.rotate-[90|180|270]`, `.spin`, `.pulse`. Example: `^play.flip-horizontal`', - // ]}, visible: {type: 'boolean', value: true, help: 'Set to `false` to hide the widget.'}, interaction: {type: 'boolean', value: true, help: 'Set to `false` to disable pointer interactions.'}, @@ -214,8 +208,7 @@ class Widget extends EventEmitter { this.container = html`
` - // this.label = html`` - // if (this.getProp('label') !== false) this.container.appendChild(this.label) + if (this.widget) this.container.appendChild(this.widget) this.container._widget_instance = this @@ -797,13 +790,6 @@ class Widget extends EventEmitter { this.container.classList.toggle('no-interaction', !this.getProp('interaction')) return - // case 'label': - // this.setContainerStyles(['label']) - // if (oldPropValue === false || this.getProp('label') === false) { - // resize.check(this.container) - // } - // return - case 'css': { this.setContainerStyles(['css']) var re = /width|height|display|margin|padding|flex/ @@ -854,7 +840,7 @@ class Widget extends EventEmitter { } - setContainerStyles(styles = ['geometry', 'label', 'css', 'visibility']) { + setContainerStyles(styles = ['geometry', 'css', 'visibility']) { if (styles.includes('geometry')) { @@ -884,24 +870,6 @@ class Widget extends EventEmitter { } - // if (styles.includes('label')) { - // - // // label - // if (this.getProp('label') === false) { - // this.container.classList.add('no-label') - // this.label.innerHTML = '' - // } else { - // this.container.classList.remove('no-label') - // var label = this.getProp('label') == 'auto'? - // this.getProp('id'): - // iconify(String(this.getProp('label')).replace(/