Skip to content

Commit 0da1ede

Browse files
authored
now fix
1 parent cab1f2a commit 0da1ede

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/helper/tools/text-tool.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,11 @@ class TextTool extends paper.Tool {
182182
// Move the transform origin down to the text baseline to match paper
183183
this.element.style.transformOrigin = `${-this.textBox.internalBounds.x}px ${-this.textBox.internalBounds.y}px`;
184184

185-
186185
// In RTL, the element is moved relative to its parent's right edge instead of its left
187186
// edge. We need to correct for this in order for the element to overlap the object in paper.
188187
let tx = 0;
189188
if (this.element.parentElement) {
190-
//tx = this.textBox.internalBounds.x;
191-
if (window.test) window.test(this);
189+
tx = -this.textBox.internalBounds.x;
192190
}
193191

194192
// Start by translating the element up so that its (0, 0) is now at the text baseline, like in paper

0 commit comments

Comments
 (0)