Skip to content

Commit 0d5e607

Browse files
committed
v14.5.1
1 parent 1cbf35c commit 0d5e607

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

dist/@melonjs/debug-plugin.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* melonJS debug plugin - v14.5.0
2+
* melonJS debug plugin - v14.5.1
33
* http://www.melonjs.org
44
* @melonjs/debug-plugin is licensed under the MIT License.
55
* http://www.opensource.org/licenses/mit-license
@@ -71,7 +71,7 @@ class DebugPanel extends Renderable {
7171
this.name = "debugPanel";
7272

7373
// the debug panel version
74-
this.version = "14.5.0";
74+
this.version = "14.5.1";
7575

7676
// persistent
7777
this.isPersistent = true;
@@ -201,12 +201,10 @@ class DebugPanel extends Renderable {
201201
if (_this.checkbox.renderHitBox.selected && this.getBounds().isFinite()) {
202202

203203
if (typeof this.ancestor !== "undefined") {
204-
var absolutePosition = this.ancestor.getAbsolutePosition();
205-
206204
renderer.save();
207-
208205
// 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();
210208
renderer.translate(
211209
-absolutePosition.x,
212210
-absolutePosition.y
@@ -282,12 +280,11 @@ class DebugPanel extends Renderable {
282280
var bounds = this.getBounds();
283281

284282
if (typeof this.ancestor !== "undefined") {
285-
var absolutePosition = this.ancestor.getAbsolutePosition();
286-
287283
renderer.save();
288284

289285
// 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();
291288
renderer.translate(
292289
-absolutePosition.x,
293290
-absolutePosition.y
@@ -297,6 +294,10 @@ class DebugPanel extends Renderable {
297294

298295
renderer.setColor("green");
299296
renderer.stroke(bounds);
297+
298+
if (typeof this.ancestor !== "undefined") {
299+
renderer.restore();
300+
}
300301
}
301302
});
302303

@@ -312,10 +313,9 @@ class DebugPanel extends Renderable {
312313

313314

314315
if (typeof this.ancestor !== "undefined") {
315-
var absolutePosition = this.ancestor.getAbsolutePosition();
316-
317316
// 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();
319319
renderer.translate(
320320
-absolutePosition.x,
321321
-absolutePosition.y

0 commit comments

Comments
 (0)