How To Set Different Width To The Boxes Based On Some Logic

I want to set the width of the boxes based on some conditions. I have successfully rendered different HTML based on conditions but if I set the width of the boxes in the template it is not considered.

If I set it in the boxRendered event the boxes overlap each other.

So, the questions is how to have some larger boxes without overlaps?

Hi,

Thank you for your question.

You can set it in onBoxRendered and call renderer.fixConnectionLines() at the end. It should recalculate positions of boxes.

Please, let me know about the results.

Note: This is only available in the last version for SharePoint 2013. This method is in earlier versions, but it is not public. You can call internal method from JS.

Note, the new version is a new major version and it has some changes in JS API. You need to remove old web part and place the new one.

Thank you very much.

How should I get a reference to the renderer object?

Hi,

Please see this my reply: