Skip to content

Commit

Permalink
Merge pull request #1646 from Azmoria/Internal---multi-token-context-…
Browse files Browse the repository at this point in the history
…menu-fix

Internal - context menu fix.
  • Loading branch information
Azmoria authored Oct 21, 2023
2 parents 1e2e40f + be20752 commit b04f036
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions TokenMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ function token_context_menu_expanded(tokenIds, e) {
console.warn(`token_context_menu_expanded was called with ids: ${JSON.stringify(tokenIds)}, but no matching tokens could be found`);
return;
}

if(door?.length > 0 && !window.DM){
return;
}



Expand All @@ -125,10 +127,10 @@ function token_context_menu_expanded(tokenIds, e) {
$('body').append(tokenOptionsClickCloseDiv);


if(tokens.length === 0 && door != undefined){
if(door?.length == 1){
if(window.DM) {

let notesRow = $(`<div class="token-image-modal-footer-select-wrapper flyout-from-menu-item"><div class="token-image-modal-footer-title">Door Note</div></div>`);
let notesRow = $(`<div class="token-image-modal-footer-select-wrapper flyout-from-menu-item"><div class="token-image-modal-footer-title">Note</div></div>`);
notesRow.hover(function (hoverEvent) {
context_menu_flyout("notes-flyout", hoverEvent, function(flyout) {
flyout.append(build_notes_flyout_menu(tokenIds));
Expand Down

0 comments on commit b04f036

Please sign in to comment.