Jason McKesson avatar Jason McKesson committed 04b7356

Fix for Issue #61.

Comments (0)

Files changed (4)

Documents/Basics/GenVectorAddition.lua

 styleLib:AddStyle(nil, "arrowhead-sum",
 	SvgWriter.Style():stroke(vectorSumColor):fill(vectorSumColor));
 styleLib:AddStyle(nil, "text-sum",
-	SvgWriter.Style():stroke("none"):fill(vectorSumColor):font_weight("bold"):font_size("25px"):font_family("monospace") );
+	SvgWriter.Style():stroke("none"):fill(vectorSumColor):font_weight("bold"):font_size("25px"):font_family("monospace"):text_anchor("end") );
 	
 local axisData = GridAxis.GridAxis2D(vp, nil, styleLib, true, nil);
 
 	vmath.vec2(-4, 2),
 
 	vmath.vec2(0, 0),
-	vmath.vec2(-2, 6),
+	vmath.vec2(-1, 6),
 };
 
 local labelOffset = vmath.vec2(5, -12);
 {
 	"A", vmath.vec2(10, 10),
 	"B", vmath.vec2(5, -5),
-	"A+B", vmath.vec2(-7, -40),
+	"A+B", vmath.vec2(-20, -40),
 }
 
 local styles =

Documents/Basics/GenVectorAdditionHeads.lua

 	vmath.vec2(3, 4),
 
 	vmath.vec2(3, 4),
-	vmath.vec2(-2, 6),
+	vmath.vec2(-1, 6),
 
 	vmath.vec2(0, 0),
-	vmath.vec2(-2, 6),
+	vmath.vec2(-1, 6),
 };
 
 local labelOffset = vmath.vec2(5, -12);
Add a comment to this file

Documents/Basics/VectorAddition.svg

Old
Old image
New
New image
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" height="300px" width="300px" >
-	<style type="text/css" ><![CDATA[.vector
+	<style type="text/css" ><![CDATA[.text
 {
-	marker-end: url(#arrow);
+	font-size: 25px;
+	font-family: monospace;
+	stroke: none;
+	font-weight: bold;
+	fill: black;
+}
+
+.__axis1
+{
 	stroke: black;
+	stroke-width: 2px;
+	fill: none;
 }
 
 .__grid1
 	fill: none;
 }
 
-.text
-{
-	font-size: 25px;
-	font-family: monospace;
-	stroke: none;
-	font-weight: bold;
-	fill: black;
-}
-
 .arrowhead
 {
 	fill: black;
 	stroke: red;
 }
 
+.vector
+{
+	marker-end: url(#arrow);
+	stroke: black;
+}
+
 .__axis_arrow_end1
 {
 	marker-end: url(#__axis_arrow1);
 }
 
-.text-sum
-{
-	font-size: 25px;
-	font-family: monospace;
-	stroke: none;
-	font-weight: bold;
-	fill: red;
-}
-
 .arrowhead-sum
 {
 	fill: red;
 	stroke: red;
 }
 
-.__axis1
+.text-sum
 {
-	stroke: black;
-	stroke-width: 2px;
-	fill: none;
+	font-size: 25px;
+	font-weight: bold;
+	font-family: monospace;
+	stroke: none;
+	text-anchor: end;
+	fill: red;
 }]]></style>
 	<defs >
 		<marker markerWidth="10" markerHeight="8" refX="10" refY="4" markerUnits="userSpaceOnUse" orient="auto" id="__axis_arrow1" >
 	<text y="190" x="205" class="text" >A</text>
 	<line x2="30" y2="180" y1="240" x1="150" class="vector" />
 	<text y="205" x="95" class="text" >B</text>
-	<line x2="90" y2="60" y1="240" x1="150" class="vector-sum" />
-	<text y="110" x="113" class="text-sum" >A+B</text>
+	<line x2="120" y2="60" y1="240" x1="150" class="vector-sum" />
+	<text y="110" x="115" class="text-sum" >A+B</text>
 </svg>
Add a comment to this file

Documents/Basics/VectorAdditionHeads.svg

Old
Old image
New
New image
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
 
 <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" height="300px" width="300px" >
-	<style type="text/css" ><![CDATA[.arrowhead
+	<style type="text/css" ><![CDATA[.__axis1
 {
-	fill: black;
 	stroke: black;
+	stroke-width: 2px;
+	fill: none;
 }
 
-.vector
+.vector-sum
 {
-	marker-end: url(#arrow);
-	stroke: black;
+	marker-end: url(#arrow-sum);
+	stroke: red;
+}
+
+.text-sum
+{
+	font-size: 25px;
+	font-weight: bold;
+	font-family: monospace;
+	stroke: none;
+	text-anchor: end;
+	fill: red;
+}
+
+.__grid1
+{
+	stroke: #CCC;
+	stroke-width: 1px;
+	fill: none;
 }
 
 .text
 	fill: black;
 }
 
-.__grid1
+.vector
 {
-	stroke: #CCC;
-	stroke-width: 1px;
-	fill: none;
+	marker-end: url(#arrow);
+	stroke: black;
 }
 
 .__axis_arrow_end1
 	marker-end: url(#__axis_arrow1);
 }
 
-.vector-sum
+.arrowhead
 {
-	marker-end: url(#arrow-sum);
-	stroke: red;
-}
-
-.__axis1
-{
+	fill: black;
 	stroke: black;
-	stroke-width: 2px;
-	fill: none;
-}
-
-.text-sum
-{
-	font-size: 25px;
-	font-weight: bold;
-	font-family: monospace;
-	stroke: none;
-	text-anchor: end;
-	fill: red;
 }
 
 .arrowhead-sum
 	<use xlink:href="#g_axes" y="0" x="0" height="300" width="300" />
 	<line x2="240" y2="120" y1="240" x1="150" class="vector" />
 	<text y="190" x="205" class="text" >A</text>
-	<line x2="90" y2="60" y1="120" x1="240" class="vector" />
-	<text y="85" x="170" class="text" >B</text>
-	<line x2="90" y2="60" y1="240" x1="150" class="vector-sum" />
-	<text y="170" x="115" class="text-sum" >A+B</text>
+	<line x2="120" y2="60" y1="120" x1="240" class="vector" />
+	<text y="85" x="185" class="text" >B</text>
+	<line x2="120" y2="60" y1="240" x1="150" class="vector-sum" />
+	<text y="170" x="130" class="text-sum" >A+B</text>
 </svg>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.