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 b6d6b9d commit 26f6701
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 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.2",
"version": "1.18.3",
"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
11 changes: 9 additions & 2 deletions packages/core/src/Player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2192,6 +2192,7 @@ export class Player
&& this._$clickTarget.scrollEnabled
&& this._$clickTarget.selectIndex === -1
) {

const deltaX: number = this._$deltaX - pageX;
const deltaY: number = this._$deltaY - pageY;

Expand Down Expand Up @@ -2471,7 +2472,10 @@ export class Player
this._$clickTarget = null;
} else {
if (this._$textField) {
this._$textField._$setIndex(stageX, stageY);
this._$textField._$setIndex(
stageX - $MATRIX_HIT_ARRAY_IDENTITY[4],
stageY - $MATRIX_HIT_ARRAY_IDENTITY[5]
);
}
}

Expand All @@ -2491,7 +2495,10 @@ export class Player
// TextField focus out
if ("_$text" in instance) {
instance.focus = true;
instance._$setIndex(stageX, stageY);
instance._$setIndex(
stageX - $MATRIX_HIT_ARRAY_IDENTITY[4],
stageY - $MATRIX_HIT_ARRAY_IDENTITY[5]
);
this._$textField = instance;

// move text area element
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.2 %c https://next2d.app",
console.log("%c Next2D Player %c 1.18.3 %c https://next2d.app",
"color: #fff; background: #5f5f5f",
"color: #fff; background: #4bc729",
"");
Expand Down

0 comments on commit 26f6701

Please sign in to comment.