1
1
/*!
2
- * melonJS debug plugin - v14.5.0
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.5.0 " ;
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
0 commit comments