pixel.js icon indicating copy to clipboard operation
pixel.js copied to clipboard

PixelJS.Entity::isDruggable do not work

Open SowingSadness opened this issue 10 years ago • 1 comments

https://github.com/rastating/pixel.js/blob/master/modules/entity.js#L57 call only once on mouse down and point.x === this.pos.x in this moment.

SowingSadness avatar Feb 26 '15 15:02 SowingSadness

Hey @SowingSadness - I'm not currently working on this project unfortunately, however, to accommodate for that scenario it should just be a case of changing the if statement to read:

if (point.x == this.pos.x) || (point.x >= this.pos.x && point.x <= this.pos.x + this.size.width) {

I will look into fixing and testing this when I get more time to pick it back up though. In the mean time though, give that solution a try and I think it will fix the issue :)

rastating avatar Feb 26 '15 18:02 rastating