Diff
diff --git a/docs/cstyle/plugins/inline/index.html b/docs/cstyle/plugins/inline/index.html
index a5b1b3c..1928562 100644
--- a/docs/cstyle/plugins/inline/index.html
+++ b/docs/cstyle/plugins/inline/index.html
@@ -26,65 +26,39 @@
- 4 "fmt"
- 5 "gui/cstyle"
- 6 "gui/element"
- 7)
- 8
- 9func Init() cstyle.Plugin {
-10 return cstyle.Plugin{
-11 Styles: map[string]string{
-12 "display": "inline",
-13 },
-14 Level: 1,
-15 Handler: func(n *element.Node, state *map[string]element.State) {
-16 s := *state
-17 self := s[n.Properties.Id]
-18 parent := s[n.Parent.Properties.Id]
-19 copyOfX := self.X
-20 copyOfY := self.Y
-21 xCollect := copyOfX
-22 // !ISSUE: Look at the if statements to see if they are properly selecting the correct elements
-23 for i, v := range n.Parent.Children {
-24 vState := s[v.Properties.Id]
-25 // if the element is the element being calculated currently
-26 if v.Properties.Id == n.Properties.Id {
-27 // then if the x coordinate of the current element plus the x shift from its prevous siblings and the width minus 2 pixels
-28 // is greater than the width of the parent plus it's x value
-29 // and it is not the first element
-30 if self.X+xCollect+self.Width-2 > parent.Width+parent.X && i > 0 {
-31 // We need to shift the element
-32 // then find the prevous sibling and add its height to the Y value to shift it downwards
-33 // shift the element to the base x (which should be the parent x value) and reset the xCollect
-34 sibling := s[n.Parent.Children[i-1].Properties.Id]
-35 self.Y += sibling.Height
-36 self.X = copyOfX
-37 xCollect = copyOfX
-38 fmt.Println(n.Properties.Id, "broke")
-39 } else if i > 0 {
-40 fmt.Println(n.Properties.Id, n.InnerText, "did not break", xCollect, self.X, self.Width, parent.Width)
-41 self.X += xCollect
-42 fmt.Println(self.X)
-43 }
-44 break
-45 } else if vState.X+vState.Width-2 > parent.Width+copyOfX && i > 0 {
-46 xCollect = copyOfX
-47 } else {
-48 xCollect += vState.Width
-49 }
-50 }
-51 propagateOffsets(n, copyOfX, copyOfY, self, state)
-52 (*state)[n.Properties.Id] = self
-53 },
-54 }
-55}
-56
-57func propagateOffsets(n *element.Node, copyOfX, copyOfY float32, self element.State, state *map[string]element.State) {
-58 s := *state
-59 for _, v := range n.Children {
-60 vState := s[v.Properties.Id]
-61 vState.X += self.X - copyOfX
-62 vState.X += self.Y - copyOfY
-63 if len(v.Children) > 0 {
-64 propagateOffsets(&v, copyOfX, copyOfY, self, state)
-65 }
-66 (*state)[v.Properties.Id] = vState
-67 }
-68}
+ 4 "gui/cstyle"
+ 5 "gui/element"
+ 6)
+ 7
+ 8func Init() cstyle.Plugin {
+ 9 return cstyle.Plugin{
+10 Styles: map[string]string{
+11 "display": "inline",
+12 },
+13 Level: 1,
+14 Handler: func(n *element.Node, state *map[string]element.State) {
+15 s := *state
+16 self := s[n.Properties.Id]
+17 parent := s[n.Parent.Properties.Id]
+18 copyOfX := self.X
+19 xCollect := float32(0)
+20 for i, v := range n.Parent.Children {
+21 vState := s[v.Properties.Id]
+22 if v.Properties.Id == n.Properties.Id {
+23 if self.X+xCollect+copyOfX+self.Width-2 > parent.Width+copyOfX && i > 0 {
+24 sibling := s[n.Parent.Children[i-1].Properties.Id]
+25 self.Y += sibling.Height
+26 self.X = copyOfX
+27 xCollect = copyOfX
+28 } else if i > 0 {
+29 self.X += xCollect
+30 }
+31 break
+32 } else if vState.X+xCollect+vState.Width-2 > parent.Width+copyOfX && i > 0 {
+33 // !ISSUE: Added the + xCollect and things got better but don't know why
+34 xCollect = copyOfX + xCollect
+35 } else {
+36 xCollect += vState.Width
+37 }
+38 }
+39 (*state)[n.Properties.Id] = self
+40 },
+41 }
+42}