Skip to content

Commit

Permalink
scene-enhance: Fixed scene links in journals
Browse files Browse the repository at this point in the history
Fixes #265
  • Loading branch information
flamewave000 committed Jan 3, 2022
1 parent f0cb77e commit 9a95687
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions df-scene-enhance/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- **FIX #263:** Scenes Context menu now works correctly.
- **FIX #242:** Sidebar no longer shifted left.
- **FIX #266:** Thumbnail overrides now generate properly.
- **FIX #265:** Scene links in journals will properly stop the scene config from opening alongside the regular prompt.

## Release 3.4.1 (2021-07-02)
- Fixed some issues with the scenes directory.
Expand Down
6 changes: 3 additions & 3 deletions df-scene-enhance/module.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "df-scene-enhance",
"version": "3.4.2",
"version": "3.5.0",
"title": "DF Scene Enhancement",
"description": "A few enhancements to scene management for players and GMs.",
"author": "flamewave000#0001",
"minimumCoreVersion": "0.8.6",
"compatibleCoreVersion": "0.8.8",
"minimumCoreVersion": "9",
"compatibleCoreVersion": "9",
"dependencies": [ { "name": "lib-wrapper" } ],
"esmodules": "{{sources}}",
"languages": [
Expand Down
9 changes: 5 additions & 4 deletions df-scene-enhance/src/df-scene-journal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export default class DFSceneJournal {
const collection = game.collections.get(a.dataset.entity);
document = collection.get(id);
if ((document.documentName === "Scene")) {
event.preventDefault();
return DFSceneJournal.displayDialog(document);
}
}
Expand All @@ -83,12 +84,12 @@ export default class DFSceneJournal {
}
const body = $("body");
if (journalClick) {
body.off("click", "a.entity-link", (TextEditor as any)._onClickContentLink);
body.on("click", "a.entity-link", DFSceneJournal._onClickContentLink);
body.off("click", "a.content-link", (TextEditor as any)._onClickContentLink);
body.on("click", "a.content-link", DFSceneJournal._onClickContentLink);
}
else {
body.off("click", "a.entity-link", DFSceneJournal._onClickContentLink);
body.on("click", "a.entity-link", (TextEditor as any)._onClickContentLink);
body.off("click", "a.content-link", DFSceneJournal._onClickContentLink);
body.on("click", "a.content-link", (TextEditor as any)._onClickContentLink);
}
}

Expand Down

0 comments on commit 9a95687

Please sign in to comment.