bruce-models 7.1.95 → 7.1.96

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.
@@ -8063,8 +8063,9 @@ var Calculator;
8063
8063
  return { result: null, attrPath: null, eValue: null };
8064
8064
  }
8065
8065
  function _getGradientTrace(value, entity, defaultToMin) {
8066
- const min = +value.points[0].position;
8067
- const max = +value.points[value.points.length - 1].position;
8066
+ const points = value.points.slice().sort((a, b) => +a.position - +b.position);
8067
+ const min = +points[0].position;
8068
+ const max = +points[points.length - 1].position;
8068
8069
  const attrPaths = parseLegacyPath(value.field);
8069
8070
  for (let i = 0; i < attrPaths.length; i++) {
8070
8071
  const attrPath = attrPaths[i];
@@ -8079,14 +8080,14 @@ var Calculator;
8079
8080
  continue;
8080
8081
  }
8081
8082
  if (eValue >= max) {
8082
- return { result: Color.ColorFromStr(value.points[value.points.length - 1].color), attrPath, eValue };
8083
+ return { result: Color.ColorFromStr(points[points.length - 1].color), attrPath, eValue };
8083
8084
  }
8084
8085
  else if (eValue <= min) {
8085
- return { result: Color.ColorFromStr(value.points[0].color), attrPath, eValue };
8086
+ return { result: Color.ColorFromStr(points[0].color), attrPath, eValue };
8086
8087
  }
8087
- for (let j = 0; j < value.points.length - 1; j++) {
8088
- const pointA = value.points[j];
8089
- const pointB = value.points[j + 1];
8088
+ for (let j = 0; j < points.length - 1; j++) {
8089
+ const pointA = points[j];
8090
+ const pointB = points[j + 1];
8090
8091
  if (eValue >= pointA.position && eValue <= pointB.position) {
8091
8092
  if (pointA.position == pointB.position) {
8092
8093
  return { result: Color.ColorFromStr(pointA.color), attrPath, eValue };
@@ -8108,7 +8109,7 @@ var Calculator;
8108
8109
  }
8109
8110
  }
8110
8111
  // Fallback to min (static, no data path resolved).
8111
- return { result: Color.ColorFromStr(value.points[0].color), attrPath: null, eValue: null };
8112
+ return { result: Color.ColorFromStr(points[0].color), attrPath: null, eValue: null };
8112
8113
  }
8113
8114
  /**
8114
8115
  * Like Calculate, but also returns an 'effective' key describing how the value
@@ -23535,7 +23536,7 @@ var UrlUtils;
23535
23536
  })(UrlUtils || (UrlUtils = {}));
23536
23537
 
23537
23538
  // This is updated with the package.json version on build.
23538
- const VERSION = "7.1.95";
23539
+ const VERSION = "7.1.96";
23539
23540
 
23540
23541
  export { VERSION, Account, AccountAudit, AccountConcept, AccountFeatures, AccountInvite, AccountLimits, AccountTemplate, AccountType, AnnDocument, AbstractApi, Api, ApiGetters, BruceApi, GlobalApi, GuardianApi, Assembly, Calculator, ChangeSet, ClientFile, ClientFileValueMap, Bounds, BruceEvent, BruceVariable, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, GeoJson, Geometry, LRUCache, UTC, CustomForm, DashboardView, DataFeed, DataLab, DataLabGroup, DataSource, DataTransform, Comment, Entity, EntityAttachment, EntityAttachmentType, EntityAttribute, EntityComment, EntityCoords, EntityHistoricData, EntityLink, EntityLod, EntityLodCategory, EntityRelation, EntityRelationType, EntitySource, EntityTableView, EntityTag, EntityType, EntityTypeRelation, EntityTypeTrigger, Ontology, OntologyDocument, ENVIRONMENT, ExportBrz, ExportCsv, ExportNsx, ExportUsd, Hexbin, ImportAssembly, ImportCad, ImportCsv, ImportGeoJson, ImportJson, ImportKml, ImportLcc, ImportTif, ImportedFile, Uploader, Markup, UIMarkup, NAVIGATOR_CHAT_EVENT_ENTITY_HIGHLIGHT_APPLIED, NAVIGATOR_CHAT_EVENT_SCENE_CONTEXT_PREFETCHED, NavigatorChatClient, NavigatorMcpWebSocketClient, Plugin, PluginAiTool, ProgramKey, MenuItem, ProjectView, ProjectViewBookmark, ProjectViewBookmarkGroup, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewLegacyTile, ProjectViewTile, ZoomControl, Scenario, HostingLocation, MessageBroker, PendingAction, RecordChangeFeed, Style, Tileset, Tracking, Permission, Session, User, UserGroup, UserMfaMethod, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils };
23541
23542
  //# sourceMappingURL=bruce-models.es5.js.map