Attribute Item Subtype #76
2 changed files with 8 additions and 1 deletions
|
|
@ -101,5 +101,11 @@ export class AttributeItemData extends foundry.abstract.TypeDataModel {
|
||||||
get isRange() {
|
get isRange() {
|
||||||
return this.max !== null;
|
return this.max !== null;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
get inferredMinimum() {
|
||||||
|
if (this.isRange) {
|
||||||
|
return this.min ?? 0;
|
||||||
|
};
|
||||||
|
};
|
||||||
// #endregion Methods
|
// #endregion Methods
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,10 @@
|
||||||
<input
|
<input
|
||||||
type="number"
|
type="number"
|
||||||
id="{{uuid}}-value"
|
id="{{uuid}}-value"
|
||||||
|
data-foreign-uuid="{{uuid}}"
|
||||||
data-foreign-name="system.value"
|
data-foreign-name="system.value"
|
||||||
value="{{ system.value }}"
|
value="{{ system.value }}"
|
||||||
min="{{ system.min }}"
|
min="{{ system.inferredMinimum }}"
|
||||||
max="{{ system.max }}"
|
max="{{ system.max }}"
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue