| | |
| | | if (!parent) { |
| | | let _parent = null |
| | | |
| | | if (_type === 'propcard') { |
| | | _parent = _p |
| | | MKEmitter.emit('changeCombineStyle', ['margin', 'padding', 'border', 'background', 'shadow']) |
| | | } else if (_type === 'cardcell') { |
| | | if (_type === 'cardcell') { |
| | | _parent = _p |
| | | MKEmitter.emit('changeCombineStyle', ['margin', 'padding', 'border', 'background', 'font']) |
| | | } else { |
| | |
| | | if (components.findIndex(cell => cell.uuid === card.uuid) > -1) { |
| | | components = components.filter(cell => cell.uuid !== card.uuid) |
| | | document.getElementById(card.uuid).classList.remove('selected-control-element') |
| | | } else if (type !== 'propcard' && parent.components.findIndex(cell => cell.uuid === card.uuid) > -1) { |
| | | components.push(card) |
| | | document.getElementById(card.uuid).classList.add('selected-control-element') |
| | | } else if (type === 'propcard' && parent.subcards.findIndex(cell => cell.uuid === card.uuid) > -1) { |
| | | } else if (type === 'cardcell' && parent.elements.findIndex(cell => cell.uuid === card.uuid) > -1) { |
| | | components.push(card) |
| | | document.getElementById(card.uuid).classList.add('selected-control-element') |
| | | } |