We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c2109ed commit c64ea1aCopy full SHA for c64ea1a
src/helper/tools/text-tool.js
@@ -183,7 +183,8 @@ class TextTool extends paper.Tool {
183
tx = -this.element.parentElement.clientWidth;
184
}
185
if ((this.alignment === "center") && this.element.parentElement) {
186
- tx = -this.element.parentElement.clientWidth / 2;
+ const bounds = this.textBox.getBounds();
187
+ tx = bounds.x / (1 + paper.view.zoom * 0.5);
188
189
// The transform origin in paper is x at justification side, y at the baseline of the text.
190
// The offset from (0, 0) to the upper left corner is recorded by internalBounds
0 commit comments