@next2d/ui 1.18.8 → 1.18.10
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/dist/Job.d.ts +1 -0
- package/dist/Job.js +16 -8
- package/package.json +3 -3
package/dist/Job.d.ts
CHANGED
package/dist/Job.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Easing } from "./Easing";
|
|
2
2
|
import { EventDispatcher, Event } from "@next2d/events";
|
|
3
|
-
import { $setTimeout, $performance } from "@next2d/share";
|
|
3
|
+
import { $setTimeout, $performance, $cancelAnimationFrame } from "@next2d/share";
|
|
4
4
|
/**
|
|
5
5
|
* @class
|
|
6
6
|
* @memberOf next2d.ui
|
|
@@ -85,6 +85,12 @@ export class Job extends EventDispatcher {
|
|
|
85
85
|
* @private
|
|
86
86
|
*/
|
|
87
87
|
this._$currentTime = 0;
|
|
88
|
+
/**
|
|
89
|
+
* @type {number}
|
|
90
|
+
* @default 0
|
|
91
|
+
* @private
|
|
92
|
+
*/
|
|
93
|
+
this._$timerId = 0;
|
|
88
94
|
}
|
|
89
95
|
/**
|
|
90
96
|
* @description 指定されたクラスのストリングを返します。
|
|
@@ -238,6 +244,10 @@ export class Job extends EventDispatcher {
|
|
|
238
244
|
* @public
|
|
239
245
|
*/
|
|
240
246
|
start() {
|
|
247
|
+
if (this._$timerId) {
|
|
248
|
+
$cancelAnimationFrame(this._$timerId);
|
|
249
|
+
}
|
|
250
|
+
this._$forceStop = false;
|
|
241
251
|
if (this._$delay) {
|
|
242
252
|
$setTimeout(() => {
|
|
243
253
|
this.initialize();
|
|
@@ -252,16 +262,14 @@ export class Job extends EventDispatcher {
|
|
|
252
262
|
* @public
|
|
253
263
|
*/
|
|
254
264
|
stop() {
|
|
265
|
+
if (this._$timerId) {
|
|
266
|
+
$cancelAnimationFrame(this._$timerId);
|
|
267
|
+
}
|
|
255
268
|
if (this.hasEventListener(Event.STOP)) {
|
|
256
269
|
this.dispatchEvent(new Event(Event.STOP));
|
|
257
270
|
this.removeAllEventListener(Event.STOP);
|
|
258
271
|
}
|
|
259
|
-
|
|
260
|
-
this.removeAllEventListener(Event.UPDATE);
|
|
261
|
-
}
|
|
262
|
-
if (this.hasEventListener(Event.COMPLETE)) {
|
|
263
|
-
this.removeAllEventListener(Event.COMPLETE);
|
|
264
|
-
}
|
|
272
|
+
this._$names = null;
|
|
265
273
|
this._$forceStop = true;
|
|
266
274
|
this._$stopFlag = true;
|
|
267
275
|
}
|
|
@@ -289,7 +297,7 @@ export class Job extends EventDispatcher {
|
|
|
289
297
|
}
|
|
290
298
|
}
|
|
291
299
|
else {
|
|
292
|
-
requestAnimationFrame(() => {
|
|
300
|
+
this._$timerId = requestAnimationFrame(() => {
|
|
293
301
|
this._$update();
|
|
294
302
|
});
|
|
295
303
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@next2d/ui",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.10",
|
|
4
4
|
"description": "Next2D UI Packages",
|
|
5
5
|
"author": "Toshiyuki Ienaga<ienaga@tvon.jp> (https://github.com/ienaga/)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"url": "git+https://github.com/Next2D/Player.git"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@next2d/events": "1.18.
|
|
36
|
-
"@next2d/share": "1.18.
|
|
35
|
+
"@next2d/events": "1.18.10",
|
|
36
|
+
"@next2d/share": "1.18.10"
|
|
37
37
|
}
|
|
38
38
|
}
|