O'Reilly Forums: Chapter 7 Arc Issue - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Chapter 7 Arc Issue

#1 User is offline   Friffer 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 03-June 12

Posted 03 June 2012 - 09:42 AM

Really enjoying the book so far and learning a lot. I have been testing my code on Chrome and Firefox, but when I started drawing the circles in chapter 7, Chrome had issues. Testing the code in the book on Chrome updates the background color and squares appear correctly, but circles do not show up.

After tinkering for a while, it seems Chrome doesn't like when the starting point and ending point of an arc are the same. I changed my code to:

context.arc(x, y, radius, 0.001, degreesToRadians(360), false);

and this seems to fix the problem. I think this is more a bug in Chrome rather than an error in the book because the book's code works in the other browsers I tested.

This post has been edited by Friffer: 03 June 2012 - 09:46 AM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users