1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

Fix spotlight effect when scrollbars visible

This commit is contained in:
Jeremy Ruston 2024-06-12 11:54:24 +01:00
parent e30746d5e5
commit 93d32d59aa

View File

@ -66,7 +66,7 @@ ElementSpotlight.prototype.querySelectorSafe = function(selector) {
ElementSpotlight.prototype.positionSpotlight = function(x,y,innerRadius,outerRadius,opacity) {
this.spotlightElement.style.display = "block";
this.spotlightElement.style.backgroundImage = "radial-gradient(circle at " + (x / window.innerWidth * 100) + "% " + (y / window.innerHeight * 100) + "%, transparent " + innerRadius + "px, rgba(0, 0, 0, " + opacity + ") " + outerRadius + "px)";
this.spotlightElement.style.backgroundImage = "radial-gradient(circle at " + (x / document.documentElement.clientWidth * 100) + "% " + (y / document.documentElement.clientHeight * 100) + "%, transparent " + innerRadius + "px, rgba(0, 0, 0, " + opacity + ") " + outerRadius + "px)";
};
ElementSpotlight.prototype.easeInOut = function(v) {