cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
595
Views
1
Helpful
1
Replies
Highlighted
Contributor

Conditionally change Node Label offset

Hi All,

I have a custom icon registered and working (it's size is wider and has less height - 48 x 16).

My question is whether it's possible to change the x & y label offsets ONLY for nodes with that icon?

My investigations so far seem to point this being controlled by Node.js->content->view->props->y value but I am not sure how to conditionally set this for the node subset.

Any Help greatly appreciated.

Many Thanks

Ben

1 REPLY 1
Highlighted
Cisco Employee

Hi Ben,

I would recommend to use standard size for all objects, but I went ahead and prepared an example for you: http://codepen.io/NEXTSUPPORT/pen/dXBdzK?editors=0010

The code extends the node class by overriding the implementation of "calcLabelPosition" method.

Should you have a question - I'm here to help.

Thanks,

Alex