Skip to content

Commit d900552

Browse files
committed
use origin as offset
1 parent 00d87a9 commit d900552

File tree

1 file changed

+20
-10
lines changed

1 file changed

+20
-10
lines changed

blocks/xcos2xml/head.xsl

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -471,16 +471,26 @@
471471
</xsl:template>
472472
<xsl:template name="mxGeometry" match="mxGeometry">
473473
<xsl:element name="mxGeometry">
474-
<xsl:if test="@x">
475-
<xsl:attribute name="x">
476-
<xsl:value-of select="@x" />
477-
</xsl:attribute>
478-
</xsl:if>
479-
<xsl:if test="@y">
480-
<xsl:attribute name="y">
481-
<xsl:value-of select="@y" />
482-
</xsl:attribute>
483-
</xsl:if>
474+
<xsl:attribute name="x">
475+
<xsl:choose>
476+
<xsl:when test="@x">
477+
<xsl:value-of select="format-number(@x+$originx,'#.0')" />
478+
</xsl:when>
479+
<xsl:otherwise>
480+
<xsl:value-of select="format-number($originx,'#.0')" />
481+
</xsl:otherwise>
482+
</xsl:choose>
483+
</xsl:attribute>
484+
<xsl:attribute name="y">
485+
<xsl:choose>
486+
<xsl:when test="@y">
487+
<xsl:value-of select="format-number(@y+$originy,'#.0')" />
488+
</xsl:when>
489+
<xsl:otherwise>
490+
<xsl:value-of select="format-number($originy,'#.0')" />
491+
</xsl:otherwise>
492+
</xsl:choose>
493+
</xsl:attribute>
484494
<xsl:if test="@width">
485495
<xsl:attribute name="width">
486496
<xsl:value-of select="@width" />

0 commit comments

Comments
 (0)