diff options
author | Walter Bender <walter.bender@gmail.com> | 2011-10-06 17:04:51 (GMT) |
---|---|---|
committer | Walter Bender <walter.bender@gmail.com> | 2011-10-06 17:04:51 (GMT) |
commit | 8a1f3843bdae84e9423c7f37a432023075c04c37 (patch) | |
tree | 04c447981926ae168e4df165b241f084cfc8f10f | |
parent | 96342f8eda0bb30d475d2d07856ae46e5e30e773 (diff) |
fixed positioning error with odd bar graphics
-rw-r--r-- | bounce.py | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -270,7 +270,7 @@ class Bounce(): (i * 2 + 1) * dx, 0, '#AAAAAA', '#AAAAAA') if int(nsegments) % 2 == 1: # odd svg += _svg_rect(dx, BAR_HEIGHT * self.scale, 0, 0, - i * 2 * dx, 0, '#FFFFFF', '#FFFFFF') + (i * 2 + 2) * dx, 0, '#FFFFFF', '#FFFFFF') svg += _svg_footer() return svg @@ -385,9 +385,7 @@ class Bounce(): def add_fraction(self, string): ''' Add a new challenge; set bar to 2x demominator ''' numden = string.split('/', 2) - _logger.debug('adding (%s, %d) to the challenges', - string, int(numden[1]) * 2) - self.challenges.append((string, int(numden[1]) * 2)) + self.challenges.append((string, int(numden[1]))) def _choose_a_fraction(self): ''' Select a new fraction challenge from the table ''' |