Skip to content

Commit

Permalink
Turtle graphics: fix Safari incompatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
iafan committed Aug 9, 2017
1 parent e666f10 commit 5a07e6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/component/drawboard/drawboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func (b *DrawBoard) addSpeechBubble(x, y float64, s string) {
"left: %.0fpx; top: %.0fpx",
cX+x-elw/2, cY+y-elh/2,
)
el.Set("style", style)
el.Call("setAttribute", "style", style)

// start animation
el.Set("className", "say-bubble animate")
Expand Down Expand Up @@ -201,7 +201,7 @@ func (b *DrawBoard) doSubStep(pos float64) {
bgPos,
)

b.gopher.Set("style", style)
b.gopher.Call("setAttribute", "style", style)
}

func (b *DrawBoard) doStep() {
Expand Down Expand Up @@ -344,7 +344,7 @@ func (b *DrawBoard) onResize() {
b.stepSize = min / (stepsInEachDirection*2 + 1) // "+1" to add 0.5 steps around
b.canvas.SetSize(b.w, b.h)
b.renderBoardLines()
b.gopher.Set("style", "")
b.gopher.Call("setAttribute", "style", "")
}

// SkipRender implements the vecty.Component interface.
Expand Down

0 comments on commit 5a07e6e

Please sign in to comment.