From 5ea3d56f3f3f7ba15f86865692d95b1b1adccbb4 Mon Sep 17 00:00:00 2001 From: Humberto Sanchez II Date: Tue, 21 Feb 2023 19:09:11 -0700 Subject: [PATCH] []: [] [https://github.com/hasii2011/oglio/issues/21] --- oglio/toXmlV10/OglLinksToDom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/oglio/toXmlV10/OglLinksToDom.py b/oglio/toXmlV10/OglLinksToDom.py index 74e72b0..28235b7 100644 --- a/oglio/toXmlV10/OglLinksToDom.py +++ b/oglio/toXmlV10/OglLinksToDom.py @@ -5,7 +5,7 @@ from xml.dom.minidom import Document from xml.dom.minidom import Element -from miniogl.AttachmentLocation import AttachmentLocation +from miniogl.AttachmentSide import AttachmentSide from miniogl.SelectAnchorPoint import SelectAnchorPoint from ogl.OglAssociation import OglAssociation @@ -53,7 +53,7 @@ def _oglInterface2ToDom(self, oglInterface: OglInterface2, xmlDoc: Document) -> root: Element = xmlDoc.createElement(XmlConstants.ELEMENT_GRAPHIC_LOLLIPOP) destAnchor: SelectAnchorPoint = oglInterface.destinationAnchor - attachmentPoint: AttachmentLocation = destAnchor.attachmentPoint + attachmentPoint: AttachmentSide = destAnchor.attachmentPoint x, y = destAnchor.GetPosition() root.setAttribute(XmlConstants.ATTR_LOLLIPOP_ATTACHMENT_POINT, attachmentPoint.__str__()) @@ -82,12 +82,12 @@ def _oglLinkToDom(self, oglLink: OglLink, xmlDoc: Document): root = xmlDoc.createElement(XmlConstants.ELEMENT_GRAPHIC_LINK) # save source and destination anchor points - x, y = oglLink.GetSource().GetModel().GetPosition() + x, y = oglLink.sourceAnchor.GetModel().GetPosition() simpleX, simpleY = self._getSimpleCoordinates(x, y) root.setAttribute(XmlConstants.ATTR_LINK_SOURCE_ANCHOR_X, simpleX) root.setAttribute(XmlConstants.ATTR_LINK_SOURCE_ANCHOR_Y, simpleY) - x, y = oglLink.GetDestination().GetModel().GetPosition() + x, y = oglLink.destinationAnchor.GetModel().GetPosition() simpleX, simpleY = self._getSimpleCoordinates(x, y) root.setAttribute(XmlConstants.ATTR_LINK_DESTINATION_ANCHOR_X, simpleX)