@next2d/text 3.11.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next2d/text",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.0",
|
|
4
4
|
"description": "Next2D Text Package",
|
|
5
5
|
"author": "Toshiyuki Ienaga<ienaga@next2d.app> (https://github.com/ienaga/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"url": "git+https://github.com/Next2D/Player.git"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@next2d/display": "3.
|
|
28
|
-
"@next2d/geom": "3.
|
|
29
|
-
"@next2d/events": "3.
|
|
30
|
-
"@next2d/ui": "3.
|
|
31
|
-
"@next2d/cache": "3.
|
|
27
|
+
"@next2d/display": "3.12.0",
|
|
28
|
+
"@next2d/geom": "3.12.0",
|
|
29
|
+
"@next2d/events": "3.12.0",
|
|
30
|
+
"@next2d/ui": "3.12.0",
|
|
31
|
+
"@next2d/cache": "3.12.0"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { $getNextTextRasterRevision } from "../../TextUtil";
|
|
1
2
|
/**
|
|
2
3
|
* @description DisplayObjectの更新フラグを立てる
|
|
3
4
|
* Set the update flag of DisplayObject
|
|
@@ -9,6 +10,9 @@
|
|
|
9
10
|
*/
|
|
10
11
|
export const execute = (display_object) => {
|
|
11
12
|
display_object.changed = true;
|
|
13
|
+
if (display_object.isText) {
|
|
14
|
+
display_object.$rasterRevision = $getNextTextRasterRevision();
|
|
15
|
+
}
|
|
12
16
|
const parent = display_object.parent;
|
|
13
17
|
if (parent && !parent.changed) {
|
|
14
18
|
execute(parent);
|
package/src/TextField.d.ts
CHANGED
|
@@ -37,6 +37,13 @@ export declare class TextField extends InteractiveObject {
|
|
|
37
37
|
* @protected
|
|
38
38
|
*/
|
|
39
39
|
$textData: TextData | null;
|
|
40
|
+
/**
|
|
41
|
+
* @description 文字ラスタの更新番号。位置・回転の変更では更新しない。
|
|
42
|
+
* Raster revision, independent of display transform changes.
|
|
43
|
+
* @type {number}
|
|
44
|
+
* @protected
|
|
45
|
+
*/
|
|
46
|
+
$rasterRevision: number;
|
|
40
47
|
/**
|
|
41
48
|
* @description テキストが HTML であるかどうかを示します。
|
|
42
49
|
* Indicates whether the text is HTML.
|
package/src/TextField.js
CHANGED
|
@@ -21,7 +21,7 @@ import { execute as textFieldKeyDownEventUseCase } from "./TextField/usecase/Tex
|
|
|
21
21
|
import { execute as textFieldDeleteTextUseCase } from "./TextField/usecase/TextFieldDeleteTextUseCase";
|
|
22
22
|
import { execute as textFieldSelectAllUseCase } from "./TextField/usecase/TextFieldSelectAllUseCase";
|
|
23
23
|
import { execute as textFieldBuildFromCharacterUseCase } from "./TextField/usecase/TextFieldBuildFromCharacterUseCase";
|
|
24
|
-
import { $clamp, $toColorInt } from "./TextUtil";
|
|
24
|
+
import { $clamp, $getNextTextRasterRevision, $toColorInt } from "./TextUtil";
|
|
25
25
|
import { InteractiveObject, Shape } from "@next2d/display";
|
|
26
26
|
/**
|
|
27
27
|
* @description TextField クラスは、テキストの表示と入力用の表示オブジェクトを作成するために使用されます。
|
|
@@ -70,6 +70,18 @@ export class TextField extends InteractiveObject {
|
|
|
70
70
|
writable: true,
|
|
71
71
|
value: void 0
|
|
72
72
|
});
|
|
73
|
+
/**
|
|
74
|
+
* @description 文字ラスタの更新番号。位置・回転の変更では更新しない。
|
|
75
|
+
* Raster revision, independent of display transform changes.
|
|
76
|
+
* @type {number}
|
|
77
|
+
* @protected
|
|
78
|
+
*/
|
|
79
|
+
Object.defineProperty(this, "$rasterRevision", {
|
|
80
|
+
enumerable: true,
|
|
81
|
+
configurable: true,
|
|
82
|
+
writable: true,
|
|
83
|
+
value: $getNextTextRasterRevision()
|
|
84
|
+
});
|
|
73
85
|
/**
|
|
74
86
|
* @description テキストが HTML であるかどうかを示します。
|
|
75
87
|
* Indicates whether the text is HTML.
|
package/src/TextUtil.d.ts
CHANGED
package/src/TextUtil.js
CHANGED
|
@@ -228,3 +228,9 @@ export const $mainCanvasPosition = {
|
|
|
228
228
|
"x": 0,
|
|
229
229
|
"y": 0
|
|
230
230
|
};
|
|
231
|
+
/**
|
|
232
|
+
* @description 文字ラスタの更新番号。Main側のキャッシュ照合にのみ使用する。
|
|
233
|
+
* Unique raster revision, used only by the main-thread cache.
|
|
234
|
+
*/
|
|
235
|
+
let $textRasterRevision = 0;
|
|
236
|
+
export const $getNextTextRasterRevision = () => ++$textRasterRevision;
|