bruce-models 2.8.6 → 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.
@@ -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
- eValue = Math.min(Math.max(eValue, value.min), value.max);
5663
- if (eValue < value.points[0].position) {
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[value.points.length - 1].color);
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.6";
11986
+ const VERSION$1 = "2.8.8";
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