bruce-models 4.1.8 → 4.2.0
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 +9 -3
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +9 -3
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/tileset/tileset.js +8 -2
- package/dist/lib/tileset/tileset.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -8946,7 +8946,10 @@ var Tileset;
|
|
|
8946
8946
|
if (!api) {
|
|
8947
8947
|
api = ENVIRONMENT.Api().GetBruceApi();
|
|
8948
8948
|
}
|
|
8949
|
-
|
|
8949
|
+
// We check if the tileset has settings.
|
|
8950
|
+
// This is to stop invalid responses from API when we make new tilesets and call an update on them.
|
|
8951
|
+
const hasSettings = data.settings && Object.keys(data.settings).length > 0;
|
|
8952
|
+
const isNew = !data.id;
|
|
8950
8953
|
if (isNew) {
|
|
8951
8954
|
const res = yield api.GET(`tileset/new?type=${data.type}&name=${Api.Encode(data.name)}`, reqParams);
|
|
8952
8955
|
data = Object.assign(Object.assign(Object.assign({}, res), data), { settings: Object.assign(Object.assign({}, res.settings), data.settings), id: res.id });
|
|
@@ -8957,7 +8960,10 @@ var Tileset;
|
|
|
8957
8960
|
yield api.POST(`ui.tileset/${data.id}`, legacy, Api.PrepReqParams(reqParams));
|
|
8958
8961
|
}
|
|
8959
8962
|
else {
|
|
8960
|
-
|
|
8963
|
+
// Avoid calling an update on a new tileset with no settings.
|
|
8964
|
+
if (!isNew || hasSettings) {
|
|
8965
|
+
yield api.POST(`tileset/update/${data.id}`, data, Api.PrepReqParams(reqParams));
|
|
8966
|
+
}
|
|
8961
8967
|
}
|
|
8962
8968
|
yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset + Api.ECacheKey.Id + data.id);
|
|
8963
8969
|
yield api.Cache.RemoveByStartsWith(Api.ECacheKey.Tileset);
|
|
@@ -13158,7 +13164,7 @@ var DataSource;
|
|
|
13158
13164
|
})(DataSource || (DataSource = {}));
|
|
13159
13165
|
|
|
13160
13166
|
// This is updated with the package.json version on build.
|
|
13161
|
-
const VERSION = "4.
|
|
13167
|
+
const VERSION = "4.2.0";
|
|
13162
13168
|
|
|
13163
13169
|
export { VERSION, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, 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, EntityCoords, EntityTypeVisualSettings, EntityAttribute, EntityHistoricData, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, Account, AccountInvite, AccountFeatures, AccountLimits, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup, Uploader, Plugin, ENVIRONMENT, DataSource };
|
|
13164
13170
|
//# sourceMappingURL=bruce-models.es5.js.map
|