bruce-models 2.8.7 → 2.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bruce-models.es5.js +14 -4
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +14 -4
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/calculator/calculator.js +13 -3
- package/dist/lib/calculator/calculator.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/calculator/calculator.d.ts +2 -2
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -5597,6 +5597,8 @@
|
|
|
5597
5597
|
}
|
|
5598
5598
|
Calculator.GetMappingValue = GetMappingValue;
|
|
5599
5599
|
function GetGradientValue(value, entity) {
|
|
5600
|
+
const min = +value.points[0].position;
|
|
5601
|
+
const max = +value.points[value.points.length - 1].position;
|
|
5600
5602
|
const attrPaths = parseLegacyPath(value.field);
|
|
5601
5603
|
for (let i = 0; i < attrPaths.length; i++) {
|
|
5602
5604
|
const attrPath = attrPaths[i];
|
|
@@ -5604,8 +5606,16 @@
|
|
|
5604
5606
|
entity: entity,
|
|
5605
5607
|
path: attrPath
|
|
5606
5608
|
});
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
+
if (typeof eValue == "string") {
|
|
5610
|
+
eValue = Number(eValue);
|
|
5611
|
+
}
|
|
5612
|
+
if ((!eValue && eValue != 0) || isNaN(eValue)) {
|
|
5613
|
+
continue;
|
|
5614
|
+
}
|
|
5615
|
+
if (eValue >= max) {
|
|
5616
|
+
return exports.Color.ColorFromStr(value.points[value.points.length - 1].color);
|
|
5617
|
+
}
|
|
5618
|
+
else if (eValue <= min) {
|
|
5609
5619
|
return exports.Color.ColorFromStr(value.points[0].color);
|
|
5610
5620
|
}
|
|
5611
5621
|
for (let i = 0; i < value.points.length - 1; i++) {
|
|
@@ -5627,7 +5637,7 @@
|
|
|
5627
5637
|
}
|
|
5628
5638
|
}
|
|
5629
5639
|
}
|
|
5630
|
-
return exports.Color.ColorFromStr(value.points[
|
|
5640
|
+
return exports.Color.ColorFromStr(value.points[0].color);
|
|
5631
5641
|
}
|
|
5632
5642
|
Calculator.GetGradientValue = GetGradientValue;
|
|
5633
5643
|
function GetInputValue(value, entity) {
|
|
@@ -11739,7 +11749,7 @@
|
|
|
11739
11749
|
DataSource.GetList = GetList;
|
|
11740
11750
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
11741
11751
|
|
|
11742
|
-
const VERSION$1 = "2.8.
|
|
11752
|
+
const VERSION$1 = "2.8.8";
|
|
11743
11753
|
|
|
11744
11754
|
exports.VERSION = VERSION$1;
|
|
11745
11755
|
exports.AbstractApi = AbstractApi;
|