js/sightLayerUpdate.js
/*
  * The token's worldTransform is not updated yet when this is called
  * probably because the token will be animated, so we need to convert
  * the token's grid position to world coords since grid position updates
  * immediately
  *
  * If there is a more straight forward way to do this it would be nice!
  */
The token's worldTransform is not updated yet when this is called
probably because the token will be animated, so we need to convert
the token's grid position to world coords since grid position updates
immediately

If there is a more straight forward way to do this it would be nice!
The token ' s worldTransform is not updated yet when this is called probably because the token will be animated so we need to convert the token ' s grid position to world coords since grid position updates immediately If there is a more straight forward way to do this it would be nice!
function _getCanvasCoords(placeable) {
  const { grid } = canvas.scene.data;
  const p = (placeable.data.door) ? placeable.doorControl : placeable.data;
  try {
     return {
      x: Math.round(grid / 2 + p.x),
      y: Math.round(grid / 2 + p.y),
    };
  } catch (error) {
    return {
      x: Math.round(grid / 2 ),
      y: Math.round(grid / 2 ),
    };
  }
}
function _getCanvasCoords ( placeable ) { const { grid } = canvas . scene . data ; const p = ( placeable . data . door ) ? placeable . doorControl : placeable . data ; try { return { x : Math . round ( grid / 2 + p . x ) , y : Math . round ( grid / 2 + p . y ) , } ; } catch ( error ) { return { x : Math . round ( grid / 2 ) , y : Math . round ( grid / 2 ) , } ; } }
The token's worldTransform is not updated yet when this is called
 probably because the token will be animated, so we need to convert
 the token's grid position to world coords since grid position updates
 immediately
The token ' s worldTransform is not updated yet when this is called probably because the token will be animated so we need to convert the token ' s grid position to world coords since grid position updates immediately
// Check if placeable is a door