bruce-models 2.8.7 → 2.8.9
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/dist/types/custom-form/custom-form-content.d.ts +20 -8
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -5652,6 +5652,8 @@ var Calculator;
|
|
|
5652
5652
|
}
|
|
5653
5653
|
Calculator.GetMappingValue = GetMappingValue;
|
|
5654
5654
|
function GetGradientValue(value, entity) {
|
|
5655
|
+
const min = +value.points[0].position;
|
|
5656
|
+
const max = +value.points[value.points.length - 1].position;
|
|
5655
5657
|
const attrPaths = parseLegacyPath(value.field);
|
|
5656
5658
|
for (let i = 0; i < attrPaths.length; i++) {
|
|
5657
5659
|
const attrPath = attrPaths[i];
|
|
@@ -5659,8 +5661,16 @@ var Calculator;
|
|
|
5659
5661
|
entity: entity,
|
|
5660
5662
|
path: attrPath
|
|
5661
5663
|
});
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
+
if (typeof eValue == "string") {
|
|
5665
|
+
eValue = Number(eValue);
|
|
5666
|
+
}
|
|
5667
|
+
if ((!eValue && eValue != 0) || isNaN(eValue)) {
|
|
5668
|
+
continue;
|
|
5669
|
+
}
|
|
5670
|
+
if (eValue >= max) {
|
|
5671
|
+
return Color.ColorFromStr(value.points[value.points.length - 1].color);
|
|
5672
|
+
}
|
|
5673
|
+
else if (eValue <= min) {
|
|
5664
5674
|
return Color.ColorFromStr(value.points[0].color);
|
|
5665
5675
|
}
|
|
5666
5676
|
for (let i = 0; i < value.points.length - 1; i++) {
|
|
@@ -5682,7 +5692,7 @@ var Calculator;
|
|
|
5682
5692
|
}
|
|
5683
5693
|
}
|
|
5684
5694
|
}
|
|
5685
|
-
return Color.ColorFromStr(value.points[
|
|
5695
|
+
return Color.ColorFromStr(value.points[0].color);
|
|
5686
5696
|
}
|
|
5687
5697
|
Calculator.GetGradientValue = GetGradientValue;
|
|
5688
5698
|
function GetInputValue(value, entity) {
|
|
@@ -11973,7 +11983,7 @@ var DataSource;
|
|
|
11973
11983
|
DataSource.GetList = GetList;
|
|
11974
11984
|
})(DataSource || (DataSource = {}));
|
|
11975
11985
|
|
|
11976
|
-
const VERSION$1 = "2.8.
|
|
11986
|
+
const VERSION$1 = "2.8.9";
|
|
11977
11987
|
|
|
11978
11988
|
export { VERSION$1 as VERSION, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, EntityCoords, EntityTypeVisualSettings, EntityAttribute, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
11979
11989
|
//# sourceMappingURL=bruce-models.es5.js.map
|