Big change to operation!
This commit is contained in:
@@ -5,10 +5,8 @@ from .operation import *
|
||||
from .change_set import ChangeSet
|
||||
|
||||
|
||||
def _to_point(coord: str) -> dict[str, float]:
|
||||
coord = coord.removeprefix('(')
|
||||
coord = coord.removesuffix(')')
|
||||
coord = coord.split(',')
|
||||
def _to_client_point(coord: str) -> dict[str, float]:
|
||||
coord = coord.removeprefix('(').removesuffix(')').split(',')
|
||||
return { 'x': float(coord[0]), 'y': float(coord[1]) }
|
||||
|
||||
|
||||
@@ -20,7 +18,7 @@ def get_node_coord(name: str, id: str) -> dict[str, float] | None:
|
||||
return None
|
||||
|
||||
coord = str(row['coord'])
|
||||
return _to_point(coord)
|
||||
return _to_client_point(coord)
|
||||
|
||||
|
||||
def set_node_coord(name: str, node_type: str, id: str, x: float, y: float) -> ChangeSet:
|
||||
|
||||
Reference in New Issue
Block a user