Widget Style changes ignored in update function

  • 23 January 2022
  • 4 replies
  • 41 views

Hi,

Style properties on Line Widget are not marked as Read-only but are ignored by update function.

Application type: web-plugin

Tested with LineWidget https://developers.miro.com/docs/interface-ilinewidget

Example:

        for (let widget of widgets) {

          // styles are not updating:

          widget.style.lineColor = '#000000';

          widget.style.lineThickness = 3;

          // other properties are updating correctly:

          widget.clientVisible = false;

        }

        await miro.board.widgets.update(widgets);

 


4 replies

Userlevel 5

It should be working. Can you try this out? 
 

const line = await miro.board.getSelection()

line[0].style.lineColor = "#09f"

miro.board.widgets.update(line[0])


 

Thanks @Addison Schultz. Your example works, must be something else in my code. Will test further and report back.

Indeed, found the issue in my own code. Thanks.

Userlevel 5

Awesome, glad you got it worked out!

Reply