Skip to content

Commit

Permalink
Revert "Fixed position set to [0,0] bug (#42)" (#45)
Browse files Browse the repository at this point in the history
This reverts commit e7dde6e.
  • Loading branch information
rkrishnasanka authored May 22, 2024
1 parent e7dde6e commit f44f2dd
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions parchmint/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ def __init__(
Raises:
Exception: [description]
"""

self.name: str = name
self.ID: str = ID
self.params = params
Expand All @@ -46,8 +45,8 @@ def __init__(
self.yspan: int = yspan
self._ports: List[Port] = ports_list if ports_list else []
self.layers: List[Layer] = layers if layers else []
self.xpos = params.data["position"][0]
self.ypos = params.data["position"][1]
self.xpos = xpos
self.ypos = ypos

@property
def ports(self) -> List[Port]:
Expand Down Expand Up @@ -99,9 +98,7 @@ def xpos(self, value) -> None:
Args:
value (int): x coordianate of the object
"""

if self.params.exists("position"):

pos = self.params.get_param("position")
pos[0] = value
self.params.set_param("position", pos)
Expand Down

0 comments on commit f44f2dd

Please sign in to comment.