manuelVo / foundryvtt-drag-ruler

A Foundry VTT module that shows a ruler when dragging tokens so you can see how far you've dragged them
MIT License
40 stars 55 forks source link

animateEntities gridless vs gridded? #202

Open caewok opened 2 years ago

caewok commented 2 years ago

I noticed that in animateEntities, the if/else test for gridded vs gridless looks to give the same result no matter what:

        if (canvas.grid.type === CONST.GRID_TYPES.GRIDLESS) {
            dx = entity.data.x - origin[0];
            dy = entity.data.y - origin[1];
        }
        else {
            dx = entity.data.x - origin[0];
            dy = entity.data.y - origin[1];
        }

Unless I am missing something, this if/else looks superfluous. Is the offset here supposed to be different for gridless maps?

manuelVo commented 2 years ago

That's indeed odd. Maybe there was a reason for this being there once, that's no longer valid. I'll try to hunt down why this is there. Thanks!