Skip to content

Commit

Permalink
Hook canvas ready all the time
Browse files Browse the repository at this point in the history
Need to re-initialize elevation layer when loading new scene.
  • Loading branch information
caewok committed Sep 1, 2022
1 parent eced023 commit f19024c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/ElevationLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,8 @@ export class ElevationLayer extends InteractionLayer {
}

/**
* Draw the weather container.
* @returns {FullCanvasContainer|null} The weather container, or null if no effect is present
* Draw the elevation container.
* @returns {FullCanvasContainer|null} The elevation container
*/
drawElevation() {
const elevationFilter = ElevationFilter.create({
Expand Down
2 changes: 1 addition & 1 deletion scripts/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Hooks.once("setup", async function() {
registerPatches();
});

Hooks.once("canvasReady", async function() {
Hooks.on("canvasReady", async function() {
// Set the elevation grid now that we know scene dimensions
if ( !canvas.elevation ) return;
canvas.elevation.initialize();
Expand Down

0 comments on commit f19024c

Please sign in to comment.