@melonjs/debug-plugin 14.4.7 → 14.5.1

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * melonJS debug plugin - v14.4.7
2
+ * melonJS debug plugin - v14.5.1
3
3
  * http://www.melonjs.org
4
4
  * @melonjs/debug-plugin is licensed under the MIT License.
5
5
  * http://www.opensource.org/licenses/mit-license
@@ -71,7 +71,7 @@ class DebugPanel extends Renderable {
71
71
  this.name = "debugPanel";
72
72
 
73
73
  // the debug panel version
74
- this.version = "14.4.7";
74
+ this.version = "14.5.1";
75
75
 
76
76
  // persistent
77
77
  this.isPersistent = true;
@@ -201,12 +201,10 @@ class DebugPanel extends Renderable {
201
201
  if (_this.checkbox.renderHitBox.selected && this.getBounds().isFinite()) {
202
202
 
203
203
  if (typeof this.ancestor !== "undefined") {
204
- var absolutePosition = this.ancestor.getAbsolutePosition();
205
-
206
204
  renderer.save();
207
-
208
205
  // if this object of this renderable parent is not the root container
209
- if (!this.root && !this.ancestor.root && this.ancestor.floating) {
206
+ if (!this.root && !this.ancestor.root && this.ancestor.isFloating) {
207
+ var absolutePosition = this.ancestor.getAbsolutePosition();
210
208
  renderer.translate(
211
209
  -absolutePosition.x,
212
210
  -absolutePosition.y
@@ -282,12 +280,11 @@ class DebugPanel extends Renderable {
282
280
  var bounds = this.getBounds();
283
281
 
284
282
  if (typeof this.ancestor !== "undefined") {
285
- var absolutePosition = this.ancestor.getAbsolutePosition();
286
-
287
283
  renderer.save();
288
284
 
289
285
  // if this object of this renderable parent is not the root container
290
- if (!this.root && !this.ancestor.root && this.ancestor.floating) {
286
+ if (!this.root && !this.ancestor.root && this.ancestor.isFloating) {
287
+ var absolutePosition = this.ancestor.getAbsolutePosition();
291
288
  renderer.translate(
292
289
  -absolutePosition.x,
293
290
  -absolutePosition.y
@@ -297,6 +294,10 @@ class DebugPanel extends Renderable {
297
294
 
298
295
  renderer.setColor("green");
299
296
  renderer.stroke(bounds);
297
+
298
+ if (typeof this.ancestor !== "undefined") {
299
+ renderer.restore();
300
+ }
300
301
  }
301
302
  });
302
303
 
@@ -312,10 +313,9 @@ class DebugPanel extends Renderable {
312
313
 
313
314
 
314
315
  if (typeof this.ancestor !== "undefined") {
315
- var absolutePosition = this.ancestor.getAbsolutePosition();
316
-
317
316
  // if this object of this renderable parent is not the root container
318
- if (!this.root && !this.ancestor.root && this.ancestor.floating) {
317
+ if (!this.root && !this.ancestor.root && this.ancestor.isFloating) {
318
+ var absolutePosition = this.ancestor.getAbsolutePosition();
319
319
  renderer.translate(
320
320
  -absolutePosition.x,
321
321
  -absolutePosition.y
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melonjs/debug-plugin",
3
- "version": "14.4.7",
3
+ "version": "14.5.1",
4
4
  "description": "melonJS debug plugin",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -36,11 +36,11 @@
36
36
  "engines": {
37
37
  "node": ">= 19"
38
38
  },
39
- "main": "dist/melonjs-debug-plugin.js",
40
- "module": "dist/melonjs-debug-plugin.js",
39
+ "main": "dist/@melonjs/debug-plugin.js",
40
+ "module": "dist/@melonjs/debug-plugin.js",
41
41
  "sideEffects": false,
42
42
  "files": [
43
- "dist/melonjs-debug-plugin.js",
43
+ "dist/@melonjs/debug-plugin.js",
44
44
  "src/",
45
45
  "package.json",
46
46
  "README.md",
@@ -52,14 +52,14 @@
52
52
  "devDependencies": {
53
53
  "@babel/eslint-parser": "^7.21.3",
54
54
  "@babel/plugin-syntax-import-assertions": "^7.20.0",
55
- "@rollup/plugin-commonjs": "^24.0.1",
55
+ "@rollup/plugin-commonjs": "^24.1.0",
56
56
  "@rollup/plugin-image": "^3.0.2",
57
- "@rollup/plugin-node-resolve": "^15.0.1",
57
+ "@rollup/plugin-node-resolve": "^15.0.2",
58
58
  "@rollup/plugin-replace": "^5.0.2",
59
59
  "del-cli": "^5.0.0",
60
- "eslint": "^8.36.0",
61
- "eslint-plugin-jsdoc": "^40.0.3",
62
- "rollup": "^3.19.1",
60
+ "eslint": "^8.38.0",
61
+ "eslint-plugin-jsdoc": "^43.0.0",
62
+ "rollup": "^3.20.5",
63
63
  "rollup-plugin-bundle-size": "^1.0.3",
64
64
  "rollup-plugin-string": "^3.0.0"
65
65
  },
package/src/debugPanel.js CHANGED
@@ -197,12 +197,10 @@ class DebugPanel extends Renderable {
197
197
  if (_this.checkbox.renderHitBox.selected && this.getBounds().isFinite()) {
198
198
 
199
199
  if (typeof this.ancestor !== "undefined") {
200
- var absolutePosition = this.ancestor.getAbsolutePosition();
201
-
202
200
  renderer.save();
203
-
204
201
  // if this object of this renderable parent is not the root container
205
- if (!this.root && !this.ancestor.root && this.ancestor.floating) {
202
+ if (!this.root && !this.ancestor.root && this.ancestor.isFloating) {
203
+ var absolutePosition = this.ancestor.getAbsolutePosition();
206
204
  renderer.translate(
207
205
  -absolutePosition.x,
208
206
  -absolutePosition.y
@@ -278,12 +276,11 @@ class DebugPanel extends Renderable {
278
276
  var bounds = this.getBounds();
279
277
 
280
278
  if (typeof this.ancestor !== "undefined") {
281
- var absolutePosition = this.ancestor.getAbsolutePosition();
282
-
283
279
  renderer.save();
284
280
 
285
281
  // if this object of this renderable parent is not the root container
286
- if (!this.root && !this.ancestor.root && this.ancestor.floating) {
282
+ if (!this.root && !this.ancestor.root && this.ancestor.isFloating) {
283
+ var absolutePosition = this.ancestor.getAbsolutePosition();
287
284
  renderer.translate(
288
285
  -absolutePosition.x,
289
286
  -absolutePosition.y
@@ -293,6 +290,10 @@ class DebugPanel extends Renderable {
293
290
 
294
291
  renderer.setColor("green");
295
292
  renderer.stroke(bounds);
293
+
294
+ if (typeof this.ancestor !== "undefined") {
295
+ renderer.restore();
296
+ }
296
297
  }
297
298
  });
298
299
 
@@ -308,10 +309,9 @@ class DebugPanel extends Renderable {
308
309
 
309
310
 
310
311
  if (typeof this.ancestor !== "undefined") {
311
- var absolutePosition = this.ancestor.getAbsolutePosition();
312
-
313
312
  // if this object of this renderable parent is not the root container
314
- if (!this.root && !this.ancestor.root && this.ancestor.floating) {
313
+ if (!this.root && !this.ancestor.root && this.ancestor.isFloating) {
314
+ var absolutePosition = this.ancestor.getAbsolutePosition();
315
315
  renderer.translate(
316
316
  -absolutePosition.x,
317
317
  -absolutePosition.y