sysmodelgen/core/draw.xsl
branchHighFidelityModel
changeset 209 af20ebf91ca6
parent 152 5acf50bbb618
child 432 0f44a943faf9
--- a/sysmodelgen/core/draw.xsl	Mon May 17 16:57:33 2010 +0100
+++ b/sysmodelgen/core/draw.xsl	Tue May 18 12:43:11 2010 +0100
@@ -1484,7 +1484,6 @@
 <!-- ====== collections  ============= -->
 
 <xsl:template match="collection">
-
 <xsl:variable name="y" >
 	<xsl:choose>
 		<xsl:when test="ancestor::package/@levels or not(ancestor::layer/meta[@rel='model-levels'])">
@@ -1501,8 +1500,13 @@
 
 	<xsl:variable name="on-level" select="preceding-sibling::collection[(current()[not(@level)] and not(@level)) or @level=current()/@level]"/>
 	
+
 <xsl:variable name="x">
 	<xsl:choose>
+		<xsl:when test="../package and not(preceding-sibling::package)">
+			<!-- treat as if it's a normal collection-->
+			<xsl:value-of  select="sum($on-level/@width) + $groupDx * count($on-level) "/>
+		</xsl:when>
 		<xsl:when test="../package">
 			<xsl:call-template name="sum-list">
 				<xsl:with-param name="list">