Issue #1350Opened August 8, 2018by shlomoko0 reactions

[BUG] render does not respond

Question

When using the code:

pan = panelManager.getPanel('myNewPanel');
pan.buttons = [] 
editor.render()

I would expect the panel to appear without any buttons. It does not appear to do so...

[update] I switched to:

    pan = pnm.getPanel('myNewPanel');
      var i;
      for (i=0; i<pan.buttons.models.length; ++i) {
        pnm.removeButton('myNewPanel', pan.buttons.models[i].id)
      } 

Which when used on 3 buttons, deleted the first and the last, but not the second.

[update 2] I have finally added the next functions, as a temp workaround until bug is resolved..

  function sleep(ms) {
    return new Promise(resolve => setTimeout(resolve, ms));
  }

  async function removeBtn(buttonName) {
    await sleep(500);
    pnm.removeButton('myNewPanel', buttonName)
  } 

What I am trying to do is build a DOM parent tree of the selected component. So that every time I click on a component I have a bottom panel that has a list of buttons representing the parents of the component.

Answers (2)

artfAugust 10, 20180 reactions

editor.Panels.getPanel('options').get('buttons').reset()

lock[bot]September 17, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.