cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
879
Views
1
Helpful
1
Replies

Conditionally change Node Label offset

ben-redfern
Level 5
Level 5

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

alzverev
Cisco Employee
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