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

by nyordanov » Thu Feb 12, 2015 12:29 pm

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?
User avatar
nyordanov
 
Posts: 8
Joined: Mon Nov 24, 2014 7:08 am

by Anton Khritonenkov » Thu Feb 12, 2015 12:41 pm

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.
User avatar
Anton Khritonenkov
 
Posts: 219
Joined: Wed Nov 12, 2014 1:33 pm

by Anton Khritonenkov » Thu Feb 12, 2015 12:42 pm

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.
User avatar
Anton Khritonenkov
 
Posts: 219
Joined: Wed Nov 12, 2014 1:33 pm

by nyordanov » Thu Feb 12, 2015 12:43 pm

Thank you very much.
User avatar
nyordanov
 
Posts: 8
Joined: Mon Nov 24, 2014 7:08 am

by nyordanov » Thu Feb 12, 2015 1:05 pm

How should I get a reference to the renderer object?
User avatar
nyordanov
 
Posts: 8
Joined: Mon Nov 24, 2014 7:08 am

by Anton Khritonenkov » Thu Feb 12, 2015 3:55 pm

Hi,

Please see this my reply:
viewtopic.php?f=29&t=215&p=497#p497
User avatar
Anton Khritonenkov
 
Posts: 219
Joined: Wed Nov 12, 2014 1:33 pm


Return to Org Chart for SharePoint 2013

cron