Skip to content

Commit

Permalink
馃悰 fix node data not containing position data
Browse files Browse the repository at this point in the history
closes #28
  • Loading branch information
ehne committed Nov 18, 2021
1 parent 4ab8913 commit 70786c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pynode_next/node.py
Expand Up @@ -231,7 +231,8 @@ def _data(self):
base['attrs']['nodes'][self._id]['labels']['tl'] = { 'angle': 135, 'text': self._labels[1] }

if self._pos != []:
base["attrs"]["nodes"][self._id]["pos"] = [core.normalise_to_canvas(i) for i in self._pos]
norm = [core.normalise_to_canvas(i) for i in self._pos]
base["attrs"]["nodes"][self._id]["pos"] = [f"{norm[0]}cx", f"{norm[1]}cy"]

return base

Expand Down

0 comments on commit 70786c1

Please sign in to comment.