Skip to content

Commit

Permalink
Ticket #171 : fixed a 'null object' issue when enabling directRect
Browse files Browse the repository at this point in the history
  • Loading branch information
obiot committed Mar 13, 2013
1 parent 35c3064 commit a1e1dee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/entity/entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,18 @@
return false;
},

/**
* @private
*/
getRect : function() {
if (this.renderable) {
// translate the renderable position since its
// position is relative to this entity
return this.renderable.getRect().translateV(this.pos);
}
return null;
},

/**
* object draw<br>
* not to be called by the end user<br>
Expand Down

1 comment on commit a1e1dee

@melonjs
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's of course dirtyrect and not directrect........

Please sign in to comment.