zeel01 / MonsterBlocks

A Foundry VTT module to add NPC sheets that faithfully reproduce the appearance of D&D 5e monster statblocks.
29 stars 26 forks source link

Resolves #191 'Show to Players' button when showing actor artwork from MonsterBlocks doesn't load the image #225

Open LunarShade opened 8 months ago

LunarShade commented 8 months ago

This issue (#191) was caused by event.target.currentSrc (local URL) being used to display the image popout. The result was that foundry attempted to display the image using a localhost url on remote machines when sharing.

Looking at the code behind the "View Character Artwork" option in the actor directory suggests that actor.img should be used instead, so that's what I went with.

Additionally, I implemented a fix for the issue where the image edit dialog would pop up on left click alongside the image popout. This is done by simply unbinding all click events on the relevant element, which is admittedly not the cleanest solution, but it seems to be working as expected.

zeel01 commented 8 months ago

@LunarShade Sorry I haven't gotten a chance to review these PRs yet, I hope to do so this weekend.