diff --git a/Main.js b/Main.js index e0377debd..e1bf944f6 100644 --- a/Main.js +++ b/Main.js @@ -147,7 +147,7 @@ function change_zoom(newZoom, x, y) { let pageY = Math.round(centerY * window.ZOOM - zoomCenterY) + window.VTTMargin; //Set scaling token names CSS variable this variable can be used with anything in #tokens - $("#tokens").get(0).style.setProperty("--font-size-zoom", Math.max(12 * Math.max((3 - window.ZOOM), 0), 8.5) + "px"); + $("#tokens").css("--font-size-zoom", Math.max(12 * Math.max((3 - window.ZOOM), 0), 8.5) + "px"); $("#VTT").css("transform", "scale(" + window.ZOOM + ")"); set_default_vttwrapper_size() diff --git a/MessageBroker.js b/MessageBroker.js index 93176bfac..41ef2cd04 100644 --- a/MessageBroker.js +++ b/MessageBroker.js @@ -1438,6 +1438,7 @@ class MessageBroker { set_default_vttwrapper_size(); reset_canvas(); + apply_zoom_from_storage(); // WE USED THE DM MAP TO GET RIGH WIDTH/HEIGHT. NOW WE REVERT TO THE PLAYER MAP diff --git a/Token.js b/Token.js index 1a4b9b7d4..8b66de873 100644 --- a/Token.js +++ b/Token.js @@ -2906,7 +2906,12 @@ function setTokenAuras (token, options) { (options.hidden || (options.hideaura && !token.attr("data-id").includes(window.PLAYER_ID)) || showAura == 'none') ? token.parent().parent().find("#aura_" + tokenId).hide() : token.parent().parent().find("#aura_" + tokenId).show() } - + if(options.animation?.aura){ + token.parent().parent().find("#aura_" + tokenId).attr('data-animation', options.animation.aura) + } + else{ + token.parent().parent().find("#aura_" + tokenId).removeAttr('data-animation') + } } else { @@ -2959,6 +2964,12 @@ function setTokenLight (token, options) { lightElement.contextmenu(function(){return false;}); $("#light_container").prepend(lightElement); } + if(options.animation?.light){ + token.parent().parent().find(".aura-element-container-clip[id='" + token.attr("data-id")+"']").attr('data-animation', options.animation.light) + } + else{ + token.parent().parent().find(".aura-element-container-clip[id='" + token.attr("data-id")+"']").removeAttr('data-animation') + } if(window.DM){ (options.hidden && options.reveal_light == 'never') ? token.parent().parent().find("#vision_" + tokenId).css("opacity", 0.5) : token.parent().parent().find("#vision_" + tokenId).css("opacity", 1) @@ -2987,6 +2998,7 @@ function setTokenLight (token, options) { } } } + } function setTokenBase(token, options) { diff --git a/TokenMenu.js b/TokenMenu.js index 29096b29f..eb80571bc 100644 --- a/TokenMenu.js +++ b/TokenMenu.js @@ -525,6 +525,10 @@ function build_token_auras_inputs(tokenIds) {