Skip to content

Commit cf10fd1

Browse files
committed
v13
1 parent b04bb29 commit cf10fd1

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/hooks/anchorInjection.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,15 @@ export function anchorInjection() {
9595

9696
if (isExistingNote) {
9797
const closeHookId = Hooks.on("closeDocumentSheetV2", async (documentSheet) => {
98-
if (!(documentSheet instanceof NoteConfig)) return;
98+
if (!(documentSheet instanceof foundry.applications.sheets.NoteConfig)) return;
9999
if (noteConfig.document.id !== documentSheet.document.id) return;
100100
Hooks.off("closeDocumentSheetV2", closeHookId);
101101
const selectedSlug = documentSheet.document.getFlag(CONSTANTS.FLAG_NAME, "slugLink");
102102
if (selectedSlug && selectedSlug.trim() !== "" && selectedSlug !== documentSheet.document.flags.ddb?.slugLink) {
103103
const update = setSlugProperties({ _id: documentSheet.document.id }, selectedSlug, documentSheet.document.label);
104104
await canvas.scene.updateEmbeddedDocuments("Note", [update]);
105105
}
106+
game.canvas.notes.draw();
106107
});
107108
}
108109
});

src/hooks/dynamicIcons.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export async function dynamicIcons() {
1111
const sourceTexture = noteConfig.document?.texture?.src;
1212

1313
const formGroupCustomElement = form.querySelector("[data-icon-custom]");
14-
const customItemElement = form.querySelector("input[name='icon.custom']");
15-
if (Icons.textureExists(noteConfig.document.texture.src) && sourceTexture) {
16-
noteConfig.object.texture.src = `${noteConfig.document._source.texture.src}`;
14+
const customItemElement = form.querySelector("file-picker[name='icon.custom'] > input");
15+
if (sourceTexture && Icons.textureExists(noteConfig.document.texture.src)) {
16+
// noteConfig.object.texture.src = `${noteConfig.document._source.texture.src}`;
1717
const customIcon = !Object.values(CONFIG.JournalEntry.noteIcons).includes(sourceTexture);
1818
data.icon = {
1919
selected: customIcon ? "" : sourceTexture,

0 commit comments

Comments
 (0)