allow copying tabs too

This commit is contained in:
bordun 2020-03-06 16:47:59 +01:00
parent 49ac867c63
commit 07b67f10d2
7 changed files with 75 additions and 48 deletions

View file

@ -42,6 +42,8 @@ class Matrix extends StaticProperties(Panel, {scroll: false}) {
super(options)
this.childrenType = undefined
this.value = []
this.on('change',(e)=>{

View file

@ -114,6 +114,7 @@ class Modal extends Panel {
this.popupContent.style.setProperty('--widget-padding', this.getProp('padding') != 'auto' ? parseFloat(this.getProp('padding')) + 'rem' : '')
this.childrenType = 'widget'
}

View file

@ -49,6 +49,8 @@ class Panel extends Container() {
super({...options, html: html`<inner></inner>`})
this.childrenType = ''
this.container.classList.toggle('no-scroll', !this.getProp('scroll'))
this.container.classList.add('layout-' + this.getProp('layout'))
@ -84,6 +86,8 @@ class Panel extends Container() {
if (this.getProp('tabs') && this.getProp('tabs').length) {
this.childrenType = 'tab'
this.value = -1
this.navigation = this.widget.appendChild(html`<div class="navigation ${this.getProp('verticalTabs') ? 'vertical' : ''}"></div>`)
@ -125,6 +129,8 @@ class Panel extends Container() {
} else if (this.getProp('widgets') && this.getProp('widgets').length) {
this.childrenType = 'widget'
this.children = options.children || new Array(this.getProp('widgets').length)
for (let i = 0; i < this.children.length; i++) {
if (this.children[i]) {