Skip to content

Commit

Permalink
fix(svg): instantiate array outside of for loop
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMarble committed Mar 5, 2022
1 parent 5f36857 commit dc058ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/svg/svg.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ func (c *Canvas) addStyles() {

func (c *Canvas) createFrames() {
term := vt10x.New(vt10x.WithSize(c.Header.Width, c.Header.Height))
c.bgColors = map[string]byte{}
for i, event := range c.Events {
_, err := term.Write([]byte(event.EventData))
if err != nil {
panic(err)
}

c.Gtransform(fmt.Sprintf("translate(%d)", c.paddedWidth()*i))
c.bgColors = map[string]byte{}

for row := 0; row < c.Header.Height; row++ {
frame := ""
Expand Down

0 comments on commit dc058ca

Please sign in to comment.