I am trying to change the nodes' text-valign property from 'bottom' to 'top' after the initialisation with the following code:
cy.$('#j').style({'text-valign': 'top'});
However when I run this code its only go up some pixels instead to the top of the node, but as soon as I click to that node, it goes to the correct position. What function should I call to solve this problem?
UPDATE
I temporarily solved the problem with a function that causes redraw (I did not have much time, could not think of another solution):
cy.$('#'+nodeid).style({'text-valign': place});
if (cy.$('#'+nodeid).hasClass('solution'))
cy.$('#'+nodeid).removeClass('solution');
else
cy.$('#'+nodeid).addClass('solution')
Regards, Oliver