Spaces:
Running
Running
Update hand.py
Browse files
hand.py
CHANGED
@@ -135,9 +135,8 @@ class Hand(object):
|
|
135 |
strokes[:, 1] *= -1
|
136 |
strokes[:, :2] -= strokes[:, :2].min() + initial_coord
|
137 |
|
138 |
-
#
|
139 |
-
|
140 |
-
strokes[:, 0] += horizontal_padding
|
141 |
|
142 |
prev_eos = 1.0
|
143 |
p = "M{},{} ".format(0, 0)
|
|
|
135 |
strokes[:, 1] *= -1
|
136 |
strokes[:, :2] -= strokes[:, :2].min() + initial_coord
|
137 |
|
138 |
+
# Center the text horizontally on the canvas (original centering logic)
|
139 |
+
strokes[:, 0] += (view_width - strokes[:, 0].max()) / 2
|
|
|
140 |
|
141 |
prev_eos = 1.0
|
142 |
p = "M{},{} ".format(0, 0)
|