Closed hsauro closed 2 years ago
Here is a method I made that moves a node text a relative distance. Incorporate something like this into SBMLDiagrams but obviously without the la argument.
def moveNodeTextPosition (la, id, coord): pt = la.getNodePosition (id)[0] pt.x = pt.x + coord.x pt.y = pt.y + coord.y la.setNodeTextPosition("x_5", pt)
The code above doesn't quite work because it doesn't move the text.
add a new function moveNodeTextPosition (https://sys-bio.github.io/SBMLDiagrams/Node.html#SBMLDiagrams.load.moveNodeTextPosition).
I noticed that if I wanted to move some text in a node it is quite tedious to do so. eg
If I wanted to move x_5 up, I would first have to get the coordinates of the text then move it from there. It would be better to have a method that could move node text relative to the node. eg
la.moveNodeTextPosition("x_5", [-10, +50])
This would move the text by -10,+50