Skip to content

Commit

Permalink
#39 文字変換の表示座標を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
ienaga committed Sep 15, 2023
1 parent 93e2c47 commit 9e00b2c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion next2d.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next2d/player",
"version": "1.18.4",
"version": "1.18.5",
"description": "Experience the fast and beautiful anti-aliased rendering of WebGL. You can create rich, interactive graphics, cross-platform applications and games without worrying about browser or device compatibility.",
"author": "Toshiyuki Ienaga<ienaga@tvon.jp> (https://github.com/ienaga/)",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/Player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ export class Player
*/
get tx (): number
{
return this._$matrix[4];
return this._$matrix[4] / this._$scale / $devicePixelRatio;
}

/**
Expand All @@ -640,7 +640,7 @@ export class Player
*/
get ty (): number
{
return this._$matrix[5];
return this._$matrix[5] / this._$scale / $devicePixelRatio;
}

/**
Expand Down
4 changes: 2 additions & 2 deletions packages/display/src/TextField.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2119,8 +2119,8 @@ export class TextField extends InteractiveObject
const offsetAlign: number = this._$getAlignOffset(lineObject, this.width);

const point: Point = this.localToGlobal(new Point(
offsetWidth + offsetAlign - player.tx,
offsetHeight + verticalAlign - player.ty
offsetWidth + offsetAlign + player.tx,
offsetHeight + verticalAlign + player.ty
));

const div: HTMLElement | null = $document
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Next2D } from "@next2d/core";

if (!("next2d" in window)) {

console.log("%c Next2D Player %c 1.18.4 %c https://next2d.app",
console.log("%c Next2D Player %c 1.18.5 %c https://next2d.app",
"color: #fff; background: #5f5f5f",
"color: #fff; background: #4bc729",
"");
Expand Down

0 comments on commit 9e00b2c

Please sign in to comment.