Skip to content

Commit 7ae19d3

Browse files
committed
v4.9.5
1 parent 93c1410 commit 7ae19d3

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

module.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "investigation-board",
33
"title": "Investigation Board",
44
"description": "<p>A Foundry VTT module that lets everyone create, edit, and move sticky and photo notes on the scene as collaborative investigation tools.</p>",
5-
"version": "4.9.4",
5+
"version": "4.9.5",
66
"socket": true,
77
"authors": [
88
{

scripts/main.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,16 +38,16 @@ function refreshDrawingsInteractivity() {
3838

3939
canvas.drawings.placeables.forEach(drawing => {
4040
const isInvestigationNote = drawing.document.flags[MODULE_ID];
41-
if (!isInvestigationNote) {
42-
drawing.eventMode = 'none';
43-
drawing.interactiveChildren = false;
44-
} else {
45-
// Ensure investigation notes are interactive and selectable
46-
// Use 'static' to ensure it receives events even if it's not "owned"
41+
if (isInvestigationNote) {
42+
// Ensure investigation notes are interactive and selectable.
43+
// Use 'static' to ensure it receives events even if it's not "owned".
4744
drawing.eventMode = 'static';
4845
drawing.interactiveChildren = true;
4946
drawing.cursor = 'pointer';
5047
}
48+
// Non-IB drawings are left at their default Foundry state so they remain
49+
// selectable in draw mode. Forcing them to 'none' breaks the ability to
50+
// select or manipulate regular drawings while IB mode is active.
5151
});
5252
}
5353

@@ -84,12 +84,15 @@ function deactivateInvestigationBoardMode() {
8484
// Clear connection numbers
8585
clearConnectionNumbers();
8686

87-
// Restore default interactivity to all drawings
87+
// Restore IB notes to default interactivity (non-IB drawings were never modified)
8888
if (canvas.drawings) {
8989
canvas.drawings.placeables.forEach(drawing => {
90-
drawing.eventMode = 'auto';
91-
drawing.interactiveChildren = true;
92-
drawing.cursor = null;
90+
const isInvestigationNote = drawing.document.flags[MODULE_ID];
91+
if (isInvestigationNote) {
92+
drawing.eventMode = 'auto';
93+
drawing.interactiveChildren = true;
94+
drawing.cursor = null;
95+
}
9396
});
9497
}
9598

0 commit comments

Comments
 (0)