Can move port again

Fixes #609.
This commit is contained in:
Arjan Molenaar 2021-01-18 21:07:45 +01:00
parent 0788570931
commit 69383cce85
No known key found for this signature in database
GPG Key ID: BF977B918996CB13

View File

@ -78,7 +78,8 @@ class ProxyPortItem(Presentation[sysml.ProxyPort], HandlePositionUpdate, Named):
return cinfo.connected.port_side(cinfo.port) if cinfo else None
def dimensions(self):
return Rectangle(-8, -8, 16, 16)
x, y = self._handles[0].pos
return Rectangle(x - 8, y - 8, 16, 16)
def point(self, x, y):
return distance_rectangle_point(self.dimensions(), (x, y))