Skip to main content

Steps to reproduce :

  1. Connect to widgets using an arrow line.
  2. Click on the line and reverse it from the menuon top.

Expected behaviour:

Line.endWidgetId == the id of widget the arrow line points to. 

And

Line.startWidgetId == the id of the widget the arrow starts from. 

Actual behavior :

Line.startWidgetId == the id of widget the arrow line points to. 

And

Line.endWidgetId == the id of the widget the arrow starts from.

Hi Mohsen,

 

Currently, the start and end widget ids are set once when the line is created, that unfortunately doesn’t reflect the logical representation of lines after you change the direction.

 

As a workaround, I’d suggest checking the style.lineStartStyle and style.lineEndStyle properties of a line object against the miro.enums.lineArrowheadStyle enum to identify the current direction of a line.

 

Hope, this helps.


Yah… good call out  @Mohsen 

the “reverse” button on widgetContextMenu for a line seems to be ~ “swap the arrowhead types for this line...while leaving the start and end connections unchanged”  
 

Reconnecting / swapping the line ends on the board itself gives the actual desired effect - of reversing startWidgetId and end…

 

Easy for that to get muddled by users… in which case checking arrowheads like @Viktor Razumov  says, seems to be the best way to get to the user’s intended meaning of the arrow. 


Reply