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 26f6701 commit 93e2c47
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 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.3",
"version": "1.18.4",
"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<[email protected]> (https://github.com/ienaga/)",
"license": "MIT",
Expand Down
20 changes: 20 additions & 0 deletions packages/core/src/Player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,26 @@ export class Player
return this._$matrix[3];
}

/**
* @member {number}
* @readonly
* @public
*/
get tx (): number
{
return this._$matrix[4];
}

/**
* @member {number}
* @readonly
* @public
*/
get ty (): number
{
return this._$matrix[5];
}

/**
* @member {string}
* @public
Expand Down
6 changes: 3 additions & 3 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,
offsetHeight + verticalAlign
offsetWidth + offsetAlign - player.tx,
offsetHeight + verticalAlign - player.ty
));

const div: HTMLElement | null = $document
Expand Down Expand Up @@ -2610,7 +2610,7 @@ export class TextField extends InteractiveObject
}

// set height
this._$bounds.yMax = this.textHeight + this._$originBounds.yMin;
this._$bounds.yMax = this.textHeight + this._$originBounds.yMin + 4;

} else {
if (this._$scrollEnabled) {
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.3 %c https://next2d.app",
console.log("%c Next2D Player %c 1.18.4 %c https://next2d.app",
"color: #fff; background: #5f5f5f",
"color: #fff; background: #4bc729",
"");
Expand Down

0 comments on commit 93e2c47

Please sign in to comment.