Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter 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)
commit8a1f3843bdae84e9423c7f37a432023075c04c37 (patch)
tree04c447981926ae168e4df165b241f084cfc8f10f
parent96342f8eda0bb30d475d2d07856ae46e5e30e773 (diff)
fixed positioning error with odd bar graphics
-rw-r--r--bounce.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/bounce.py b/bounce.py
index 2575e16..ba1cecb 100644
--- a/bounce.py
+++ b/bounce.py
@@ -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 '''