use "none" for plugin that does not have kind

pull/3094/head
yann300 5 years ago
parent e545c652d9
commit bfdafca2e9
  1. 8
      src/app/components/vertical-icons.js

@ -73,7 +73,7 @@ export class VerticalIcons extends Plugin {
title="${title}"> title="${title}">
<img class="image" src="${icon}" alt="${name}" /> <img class="image" src="${icon}" alt="${name}" />
</div>` </div>`
this.iconKind[kind || 'other'].appendChild(this.icons[name]) this.iconKind[kind || 'none'].appendChild(this.icons[name])
} }
/** /**
@ -146,7 +146,7 @@ export class VerticalIcons extends Plugin {
* @param {ModuleProfile} profile The profile of the module * @param {ModuleProfile} profile The profile of the module
*/ */
removeIcon ({kind, name}) { removeIcon ({kind, name}) {
if (this.icons[name]) this.iconKind[kind || 'other'].removeChild(this.icons[name]) if (this.icons[name]) this.iconKind[kind || 'none'].removeChild(this.icons[name])
} }
/** /**
@ -335,7 +335,7 @@ export class VerticalIcons extends Plugin {
</div> </div>
` `
this.iconKind['other'] = yo` this.iconKind['none'] = yo`
<div id='otherIcons'> <div id='otherIcons'>
</div> </div>
` `
@ -354,7 +354,7 @@ export class VerticalIcons extends Plugin {
${this.iconKind['testing']} ${this.iconKind['testing']}
${this.iconKind['analysis']} ${this.iconKind['analysis']}
${this.iconKind['debugging']} ${this.iconKind['debugging']}
${this.iconKind['other']} ${this.iconKind['none']}
${this.iconKind['settings']} ${this.iconKind['settings']}
</div> </div>
` `

Loading…
Cancel
Save