Skip to content

Commit

Permalink
Fixing debounce
Browse files Browse the repository at this point in the history
  • Loading branch information
ironmonk88 committed Sep 23, 2023
1 parent 7cfd489 commit d70e226
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { updateRuleProviderVariable } from "./api.js";
export const registerSettings = function () {
let modulename = "enhanced-terrain-layer";

const debouncedReload = foundry.utils.debounce(function () { window.location.reload(); }, 100);
const debouncedRefresh = foundry.utils.debounce(function () { canvas.terrain.refresh(); }, 100);

let imageoptions = {
Expand Down Expand Up @@ -66,7 +65,7 @@ export const registerSettings = function () {
default: 'diagonal',
type: String,
choices: imageoptions,
onChange: debouncedReload
requiresReload: true
});
game.settings.register(modulename, 'show-text', {
name: "EnhancedTerrainLayer.show-text.name",
Expand Down

0 comments on commit d70e226

Please sign in to comment.