cancel
Showing results for 
Search instead for 
Did you mean: 

SAC widget's width not adapted after moveWidget

stephlef
Participant

Hello SAC-Experts,

I have issues with moving & resizing in SAC Stories.

Scenario:I want to move a widget (a chart) between two panels of different widths. The ultimate goal is to resize the chart quickly. The chart inside the panel has a width of 100% (of the panel's width). I use panel moveWidget.

Expected behavior: Both panels being differently wide, I would have expected that the chart always be 100% of the panel's width.

Problem: Instead, the absolute width is kept when moving the widget around. In other words, the chart with width set to 100% keeps the same width in pixels when moving between panels of different widths. I see the chart moving between panels.

I'm working in Ms Edge.

Thanks for your help! Best regards,

Stéphane

View Entire Topic
Susanne_Helbig
Product and Topic Expert
Product and Topic Expert

Dear stephlef,

what about adding the following code after moving the widget?

Widget_1.getLayout().setTop(LayoutValue.create(0,LayoutUnit.Percent));
Widget_1.getLayout().setBottom(LayoutValue.create(0,LayoutUnit.Percent));
Widget_1.getLayout().setLeft(LayoutValue.create(0,LayoutUnit.Percent));
Widget_1.getLayout().setRight(LayoutValue.create(0,LayoutUnit.Percent));

Best regards
Susanne

stephlef
Participant
0 Kudos

Dear susannehelbig ,

Thanks for your answer.

I tried this idea this morning and got a warning in runtime saying setRight cannot be applied (I don't have the exact phrasing in mind).

I retried this afternoon, and it works, however I consider this as a workaround a bug, as properties are not being interpreted in the new container.

Best regards,

Stéphane

Susanne_Helbig
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear stephlef,

in this case I would recommend you to create an SAP incident on component LOD-ANA-UNS-TPL

Best regards
Susanne