Skip to main content

Widget Style changes ignored in update function


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

Addison Schultz
Mironeer

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.


Addison Schultz
Mironeer

Awesome, glad you got it worked out!