fix: Add background-origin: border-box to gradient styles to prevent wrapping artifacts and update module version.
This commit is contained in:
parent
c25baa2554
commit
b1042f81eb
2 changed files with 4 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "dh-feartrackerplus",
|
||||
"title": "Daggerheart Fear Tracker Plus",
|
||||
"version": "2.0.0",
|
||||
"version": "2.0.1",
|
||||
"compatibility": {
|
||||
"minimum": "13",
|
||||
"verified": "13"
|
||||
|
|
@ -32,6 +32,6 @@
|
|||
],
|
||||
"url": "https://github.com/cptn-cosmo/dh-feartrackerplus",
|
||||
"manifest": "https://github.com/cptn-cosmo/dh-feartrackerplus/releases/latest/download/module.json",
|
||||
"download": "https://github.com/cptn-cosmo/dh-feartrackerplus/releases/download/2.0.0/dh-feartrackerplus.zip",
|
||||
"download": "https://github.com/cptn-cosmo/dh-feartrackerplus/releases/download/2.0.1/dh-feartrackerplus.zip",
|
||||
"description": "Customizes the Fear Tracker for Daggerheart."
|
||||
}
|
||||
|
|
@ -261,7 +261,7 @@ export class FearTrackerApp extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
const fullColor = game.settings.get("dh-feartrackerplus", "fullColor");
|
||||
if (fullColor.includes('gradient')) {
|
||||
const posPercent = total > 1 ? (index / (total - 1)) * 100 : 0;
|
||||
return `background: ${fullColor} no-repeat; background-size: ${total * 100}% 100%; background-position: ${posPercent}% 0%;`;
|
||||
return `background: ${fullColor} no-repeat; background-size: ${total * 100}% 100%; background-position: ${posPercent}% 0%; background-origin: border-box;`;
|
||||
}
|
||||
color = fullColor;
|
||||
} else {
|
||||
|
|
@ -278,7 +278,7 @@ export class FearTrackerApp extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
// Prevent wrapping artifacts with no-repeat.
|
||||
// Handle single token case to avoid /0 NaN.
|
||||
const posPercent = total > 1 ? (index / (total - 1)) * 100 : 0;
|
||||
return `background: ${gradient} no-repeat; background-size: ${total * 100}% 100%; background-position: ${posPercent}% 0%;`;
|
||||
return `background: ${gradient} no-repeat; background-size: ${total * 100}% 100%; background-position: ${posPercent}% 0%; background-origin: border-box;`;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue