bruce-models 0.8.6 → 0.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 +235 -139
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +235 -139
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/common/cartes.js +68 -0
- package/dist/lib/common/cartes.js.map +1 -1
- package/dist/lib/markup/markup.js +167 -139
- package/dist/lib/markup/markup.js.map +1 -1
- package/dist/types/common/cartes.d.ts +32 -0
- package/dist/types/markup/markup.d.ts +208 -203
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -2372,6 +2372,74 @@ var Cartes;
|
|
|
2372
2372
|
return true;
|
|
2373
2373
|
}
|
|
2374
2374
|
Cartes.IsEqualCartes3 = IsEqualCartes3;
|
|
2375
|
+
/**
|
|
2376
|
+
* Returns true if the given ring is closed.
|
|
2377
|
+
* A ring is closed if the first and last point are equal.
|
|
2378
|
+
* A ring with less than 2 points is not closed.
|
|
2379
|
+
* @param points
|
|
2380
|
+
* @returns
|
|
2381
|
+
*/
|
|
2382
|
+
function IsRing2Closed(points) {
|
|
2383
|
+
if (points.length < 2) {
|
|
2384
|
+
return false;
|
|
2385
|
+
}
|
|
2386
|
+
else if (!IsEqualCartes2(points[0], points[points.length - 1])) {
|
|
2387
|
+
return false;
|
|
2388
|
+
}
|
|
2389
|
+
return true;
|
|
2390
|
+
}
|
|
2391
|
+
Cartes.IsRing2Closed = IsRing2Closed;
|
|
2392
|
+
/**
|
|
2393
|
+
* Returns true if the given ring is closed.
|
|
2394
|
+
* A ring is closed if the first and last point are equal.
|
|
2395
|
+
* A ring with less than 2 points is not closed.
|
|
2396
|
+
* @param points
|
|
2397
|
+
* @returns
|
|
2398
|
+
*/
|
|
2399
|
+
function IsRing3Closed(points) {
|
|
2400
|
+
if (points.length < 2) {
|
|
2401
|
+
return false;
|
|
2402
|
+
}
|
|
2403
|
+
else if (!IsEqualCartes3(points[0], points[points.length - 1])) {
|
|
2404
|
+
return false;
|
|
2405
|
+
}
|
|
2406
|
+
return true;
|
|
2407
|
+
}
|
|
2408
|
+
Cartes.IsRing3Closed = IsRing3Closed;
|
|
2409
|
+
/**
|
|
2410
|
+
* Closes given ring by adding the first point to the end of the array.
|
|
2411
|
+
* This will mutate the given array.
|
|
2412
|
+
* Will not do anything if the ring is already closed.
|
|
2413
|
+
* @param points
|
|
2414
|
+
* @returns
|
|
2415
|
+
*/
|
|
2416
|
+
function CloseRing2(points) {
|
|
2417
|
+
if (points.length < 2) {
|
|
2418
|
+
return;
|
|
2419
|
+
}
|
|
2420
|
+
else if (IsRing2Closed(points)) {
|
|
2421
|
+
return;
|
|
2422
|
+
}
|
|
2423
|
+
points.push(points[0]);
|
|
2424
|
+
}
|
|
2425
|
+
Cartes.CloseRing2 = CloseRing2;
|
|
2426
|
+
/**
|
|
2427
|
+
* Closes given ring by adding the first point to the end of the array.
|
|
2428
|
+
* This will mutate the given array.
|
|
2429
|
+
* Will not do anything if the ring is already closed.
|
|
2430
|
+
* @param points
|
|
2431
|
+
* @returns
|
|
2432
|
+
*/
|
|
2433
|
+
function CloseRing3(points) {
|
|
2434
|
+
if (points.length < 2) {
|
|
2435
|
+
return;
|
|
2436
|
+
}
|
|
2437
|
+
else if (IsRing3Closed(points)) {
|
|
2438
|
+
return;
|
|
2439
|
+
}
|
|
2440
|
+
points.push(points[0]);
|
|
2441
|
+
}
|
|
2442
|
+
Cartes.CloseRing3 = CloseRing3;
|
|
2375
2443
|
})(Cartes || (Cartes = {}));
|
|
2376
2444
|
|
|
2377
2445
|
/**
|
|
@@ -7139,147 +7207,175 @@ var ImportedFile;
|
|
|
7139
7207
|
*/
|
|
7140
7208
|
var Markup;
|
|
7141
7209
|
(function (Markup) {
|
|
7142
|
-
var
|
|
7143
|
-
(function (
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7210
|
+
var Div;
|
|
7211
|
+
(function (Div) {
|
|
7212
|
+
// Types of div that can be created.
|
|
7213
|
+
var EType;
|
|
7214
|
+
(function (EType) {
|
|
7215
|
+
// Default, no special handling.
|
|
7216
|
+
EType["Default"] = "default";
|
|
7217
|
+
// Callout, assumes it will be positioned in 3d space.
|
|
7218
|
+
// Assumes existence of line that is used to anchor it.
|
|
7219
|
+
EType["Callout"] = "callout";
|
|
7220
|
+
})(EType = Div.EType || (Div.EType = {}));
|
|
7221
|
+
// Describes expected content of a row cell.
|
|
7222
|
+
var EItemType;
|
|
7223
|
+
(function (EItemType) {
|
|
7224
|
+
// Default, no special handling.
|
|
7225
|
+
EItemType["Default"] = "DEFAULT";
|
|
7226
|
+
// Embed, assume content is html.
|
|
7227
|
+
// Make it take over the whole cell instead of padding it and such.
|
|
7228
|
+
EItemType["Embed"] = "EMBED";
|
|
7229
|
+
})(EItemType = Div.EItemType || (Div.EItemType = {}));
|
|
7230
|
+
var ItemAction;
|
|
7231
|
+
(function (ItemAction) {
|
|
7232
|
+
// Types of actions that can be performed when a cell is clicked.
|
|
7233
|
+
// Null = "NONE".
|
|
7147
7234
|
var EType;
|
|
7148
7235
|
(function (EType) {
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
//
|
|
7153
|
-
EType["
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7158
|
-
//
|
|
7159
|
-
|
|
7160
|
-
//
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7172
|
-
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7183
|
-
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7197
|
-
|
|
7198
|
-
|
|
7199
|
-
|
|
7200
|
-
|
|
7201
|
-
|
|
7202
|
-
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
|
|
7208
|
-
|
|
7209
|
-
|
|
7210
|
-
|
|
7211
|
-
|
|
7212
|
-
|
|
7213
|
-
|
|
7214
|
-
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7219
|
-
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
|
|
7223
|
-
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
|
|
7233
|
-
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7244
|
-
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7249
|
-
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7254
|
-
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7274
|
-
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7279
|
-
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7236
|
+
EType["None"] = "NONE";
|
|
7237
|
+
// Open a link specified in params.
|
|
7238
|
+
EType["OpenLink"] = "LINK";
|
|
7239
|
+
// Open the markup's entity's details panel.
|
|
7240
|
+
EType["OpenInfoView"] = "INFOVIEW";
|
|
7241
|
+
// Open the markup's entity's gallery popup.
|
|
7242
|
+
EType["OpenEntityGallery"] = "GALLERY";
|
|
7243
|
+
// Toggle visibility of the markup's entity's relationships.
|
|
7244
|
+
EType["ToggleRelationships"] = "RELATIONSHIPS";
|
|
7245
|
+
// Dictates this cell can be used to drag the div around.
|
|
7246
|
+
EType["Draggable"] = "DRAGABBLE";
|
|
7247
|
+
// Closes the markup.
|
|
7248
|
+
EType["Close"] = "CLOSE";
|
|
7249
|
+
// Opens a bookmark specified in params.
|
|
7250
|
+
EType["OpenBookmark"] = "BOOKMARK";
|
|
7251
|
+
})(EType = ItemAction.EType || (ItemAction.EType = {}));
|
|
7252
|
+
})(ItemAction = Div.ItemAction || (Div.ItemAction = {}));
|
|
7253
|
+
Div.DEFAULT = {
|
|
7254
|
+
contentRows: [
|
|
7255
|
+
{
|
|
7256
|
+
height: 100,
|
|
7257
|
+
items: [
|
|
7258
|
+
{
|
|
7259
|
+
contentType: EItemType.Default,
|
|
7260
|
+
text: "Type here...",
|
|
7261
|
+
width: 100,
|
|
7262
|
+
backgroundColor: "white",
|
|
7263
|
+
fontColor: "black",
|
|
7264
|
+
textAlign: "center",
|
|
7265
|
+
verticalAlign: "center",
|
|
7266
|
+
fontSize: 15
|
|
7267
|
+
}
|
|
7268
|
+
]
|
|
7269
|
+
}
|
|
7270
|
+
],
|
|
7271
|
+
height: null,
|
|
7272
|
+
width: null,
|
|
7273
|
+
id: null,
|
|
7274
|
+
x: null,
|
|
7275
|
+
y: null,
|
|
7276
|
+
borderColor: "black",
|
|
7277
|
+
borderWidth: 1,
|
|
7278
|
+
borderUsingPercent: false,
|
|
7279
|
+
borderRadius: 8,
|
|
7280
|
+
type: EType.Default
|
|
7281
|
+
};
|
|
7282
|
+
})(Div = Markup.Div || (Markup.Div = {}));
|
|
7283
|
+
var Drawing;
|
|
7284
|
+
(function (Drawing) {
|
|
7285
|
+
// Describes a line end's head.
|
|
7286
|
+
var EHeadStyle;
|
|
7287
|
+
(function (EHeadStyle) {
|
|
7288
|
+
EHeadStyle["None"] = "NONE";
|
|
7289
|
+
EHeadStyle["Circle"] = "CIRCLE";
|
|
7290
|
+
EHeadStyle["Arrow"] = "ARROW";
|
|
7291
|
+
})(EHeadStyle = Drawing.EHeadStyle || (Drawing.EHeadStyle = {}));
|
|
7292
|
+
var Line;
|
|
7293
|
+
(function (Line) {
|
|
7294
|
+
// Dictates where on a DIV an anchor should snap to.
|
|
7295
|
+
var EAnchorDivSide;
|
|
7296
|
+
(function (EAnchorDivSide) {
|
|
7297
|
+
EAnchorDivSide[EAnchorDivSide["TopLeft"] = 0] = "TopLeft";
|
|
7298
|
+
EAnchorDivSide[EAnchorDivSide["TopRight"] = 1] = "TopRight";
|
|
7299
|
+
EAnchorDivSide[EAnchorDivSide["BottomLeft"] = 2] = "BottomLeft";
|
|
7300
|
+
EAnchorDivSide[EAnchorDivSide["BottomRight"] = 3] = "BottomRight";
|
|
7301
|
+
EAnchorDivSide[EAnchorDivSide["Center"] = 4] = "Center";
|
|
7302
|
+
EAnchorDivSide[EAnchorDivSide["CenterLeft"] = 5] = "CenterLeft";
|
|
7303
|
+
EAnchorDivSide[EAnchorDivSide["CenterRight"] = 6] = "CenterRight";
|
|
7304
|
+
EAnchorDivSide[EAnchorDivSide["CenterTop"] = 7] = "CenterTop";
|
|
7305
|
+
EAnchorDivSide[EAnchorDivSide["CenterBottom"] = 8] = "CenterBottom";
|
|
7306
|
+
})(EAnchorDivSide = Line.EAnchorDivSide || (Line.EAnchorDivSide = {}));
|
|
7307
|
+
// Dictates what end of the line an anchor should render on.
|
|
7308
|
+
var EAnchorLineSide;
|
|
7309
|
+
(function (EAnchorLineSide) {
|
|
7310
|
+
EAnchorLineSide[EAnchorLineSide["Start"] = 0] = "Start";
|
|
7311
|
+
EAnchorLineSide[EAnchorLineSide["End"] = 1] = "End";
|
|
7312
|
+
})(EAnchorLineSide = Line.EAnchorLineSide || (Line.EAnchorLineSide = {}));
|
|
7313
|
+
Line.DEFAULT = {
|
|
7314
|
+
brushColor: "rgba(255, 255, 255, 1)",
|
|
7315
|
+
brushSize: 4,
|
|
7316
|
+
path: null,
|
|
7317
|
+
pathType: "LINE",
|
|
7318
|
+
transform: null,
|
|
7319
|
+
snaps: null
|
|
7320
|
+
};
|
|
7321
|
+
})(Line = Drawing.Line || (Drawing.Line = {}));
|
|
7322
|
+
var FreePaint;
|
|
7323
|
+
(function (FreePaint) {
|
|
7324
|
+
FreePaint.DEFAULT = {
|
|
7325
|
+
brushColor: "rgba(255, 255, 255, 1)",
|
|
7326
|
+
brushSize: 4,
|
|
7327
|
+
path: null,
|
|
7328
|
+
pathType: "PLAIN",
|
|
7329
|
+
transform: null
|
|
7330
|
+
};
|
|
7331
|
+
})(FreePaint = Drawing.FreePaint || (Drawing.FreePaint = {}));
|
|
7332
|
+
})(Drawing = Markup.Drawing || (Markup.Drawing = {}));
|
|
7333
|
+
var Entity3d;
|
|
7334
|
+
(function (Entity3d) {
|
|
7335
|
+
var Polygon;
|
|
7336
|
+
(function (Polygon) {
|
|
7337
|
+
// Determines if terrain and 3d models should be overlapped or not.
|
|
7338
|
+
var EClassificationType;
|
|
7339
|
+
(function (EClassificationType) {
|
|
7340
|
+
// 3d models and terrain are overlapped.
|
|
7341
|
+
EClassificationType["Both"] = "BOTH";
|
|
7342
|
+
// Only terrain is overlapped.
|
|
7343
|
+
EClassificationType["Terrain"] = "TERRAIN";
|
|
7344
|
+
})(EClassificationType = Polygon.EClassificationType || (Polygon.EClassificationType = {}));
|
|
7345
|
+
Polygon.DEFAULT = {
|
|
7346
|
+
type: "POLYGON",
|
|
7347
|
+
id: null,
|
|
7348
|
+
positions: null,
|
|
7349
|
+
color: "rgba(254, 234, 57, 0.54)",
|
|
7350
|
+
outlineColor: "rgba(215, 215, 215, 0)",
|
|
7351
|
+
outlineWidth: 2,
|
|
7352
|
+
extrudedHeight: 0,
|
|
7353
|
+
classificationType: EClassificationType.Both,
|
|
7354
|
+
smoothen: 0
|
|
7355
|
+
};
|
|
7356
|
+
})(Polygon = Entity3d.Polygon || (Entity3d.Polygon = {}));
|
|
7357
|
+
var Polyline;
|
|
7358
|
+
(function (Polyline) {
|
|
7359
|
+
Polyline.DEFAULT = {
|
|
7360
|
+
type: "POLYLINE",
|
|
7361
|
+
id: null,
|
|
7362
|
+
positions: null,
|
|
7363
|
+
color: "rgba(254, 234, 57, 0.54)",
|
|
7364
|
+
outlineWidth: 4,
|
|
7365
|
+
smoothen: 0
|
|
7366
|
+
};
|
|
7367
|
+
})(Polyline = Entity3d.Polyline || (Entity3d.Polyline = {}));
|
|
7368
|
+
var Circle;
|
|
7369
|
+
(function (Circle) {
|
|
7370
|
+
Circle.DEFAULT = {
|
|
7371
|
+
type: "CIRCLE",
|
|
7372
|
+
id: null,
|
|
7373
|
+
position: null,
|
|
7374
|
+
radius: 50,
|
|
7375
|
+
color: "rgba(254, 234, 57, 0.54)"
|
|
7376
|
+
};
|
|
7377
|
+
})(Circle = Entity3d.Circle || (Entity3d.Circle = {}));
|
|
7378
|
+
})(Entity3d = Markup.Entity3d || (Markup.Entity3d = {}));
|
|
7283
7379
|
})(Markup || (Markup = {}));
|
|
7284
7380
|
|
|
7285
7381
|
export { AnnDocument, CustomForm, CustomFormContent, AbstractApi, Api, BruceApi, CamApi, IdmApi, GlobalApi, Calculator, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityGlobe, EntityFilterGetter, BatchedDataGetter, EntityCoords, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, PendingAction, MessageBroker, Style, TilesetEntitiesMapTiles, TilesetExtMapTiles, Tileset, Permission, Session, UserGroup, User, Account, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, ImportCad, ImportCsv, ImportJson, ImportKml, ImportedFile, Markup };
|