Skip to content

Commit

Permalink
fix editor not resizing
Browse files Browse the repository at this point in the history
  • Loading branch information
ardittristan committed Oct 20, 2020
1 parent bad79fd commit 3f86d53
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Patch Notes

## Version 0.1.2

* Fix json editor not resizing.

## Version 0.1.1

* Add check to skills in generator.
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
"name": "npcgen",
"title": "Not Enough NPCs: A 5e NPC Generator",
"description": "Allows you to generate basic npc characters in foundry.",
"version": "0.1.1",
"version": "0.1.2",
"author": "ardittristan#0001",
"esmodules": [ "npc-gen.js" ],
"socket": true,
"url": "https://github.com/ardittristan/VTTNPCGen",
"manifest": "https://raw.githubusercontent.com/ardittristan/VTTNPCGen/master/module.json",
"download": "https://github.com/ardittristan/VTTNPCGen/releases/latest/download/nenpc.zip",
"minimumCoreVersion": "0.5.5",
"compatibleCoreVersion": "0.7.3",
"compatibleCoreVersion": "0.7.4",
"systems": ["dnd5e"],
"styles": [
"css/npcgen.css",
Expand Down
5 changes: 4 additions & 1 deletion npc-gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -1265,7 +1265,10 @@ class GeneratorWindow extends FormApplication {
exec: this.sendToSettings
});
this.editorArray[name].getSession().on('change', () => { if (this.unsaved === false) { this.unsaved = true; } });

new ResizeObserver(() => {
this.editorArray[name].resize();
this.editorArray[name].renderer.updateFull();
}).observe(this.editorArray[name].container);
}
/**
* @param {JQuery} html
Expand Down

0 comments on commit 3f86d53

Please sign in to comment.