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.umd.js
CHANGED
|
@@ -2333,6 +2333,74 @@
|
|
|
2333
2333
|
return true;
|
|
2334
2334
|
}
|
|
2335
2335
|
Cartes.IsEqualCartes3 = IsEqualCartes3;
|
|
2336
|
+
/**
|
|
2337
|
+
* Returns true if the given ring is closed.
|
|
2338
|
+
* A ring is closed if the first and last point are equal.
|
|
2339
|
+
* A ring with less than 2 points is not closed.
|
|
2340
|
+
* @param points
|
|
2341
|
+
* @returns
|
|
2342
|
+
*/
|
|
2343
|
+
function IsRing2Closed(points) {
|
|
2344
|
+
if (points.length < 2) {
|
|
2345
|
+
return false;
|
|
2346
|
+
}
|
|
2347
|
+
else if (!IsEqualCartes2(points[0], points[points.length - 1])) {
|
|
2348
|
+
return false;
|
|
2349
|
+
}
|
|
2350
|
+
return true;
|
|
2351
|
+
}
|
|
2352
|
+
Cartes.IsRing2Closed = IsRing2Closed;
|
|
2353
|
+
/**
|
|
2354
|
+
* Returns true if the given ring is closed.
|
|
2355
|
+
* A ring is closed if the first and last point are equal.
|
|
2356
|
+
* A ring with less than 2 points is not closed.
|
|
2357
|
+
* @param points
|
|
2358
|
+
* @returns
|
|
2359
|
+
*/
|
|
2360
|
+
function IsRing3Closed(points) {
|
|
2361
|
+
if (points.length < 2) {
|
|
2362
|
+
return false;
|
|
2363
|
+
}
|
|
2364
|
+
else if (!IsEqualCartes3(points[0], points[points.length - 1])) {
|
|
2365
|
+
return false;
|
|
2366
|
+
}
|
|
2367
|
+
return true;
|
|
2368
|
+
}
|
|
2369
|
+
Cartes.IsRing3Closed = IsRing3Closed;
|
|
2370
|
+
/**
|
|
2371
|
+
* Closes given ring by adding the first point to the end of the array.
|
|
2372
|
+
* This will mutate the given array.
|
|
2373
|
+
* Will not do anything if the ring is already closed.
|
|
2374
|
+
* @param points
|
|
2375
|
+
* @returns
|
|
2376
|
+
*/
|
|
2377
|
+
function CloseRing2(points) {
|
|
2378
|
+
if (points.length < 2) {
|
|
2379
|
+
return;
|
|
2380
|
+
}
|
|
2381
|
+
else if (IsRing2Closed(points)) {
|
|
2382
|
+
return;
|
|
2383
|
+
}
|
|
2384
|
+
points.push(points[0]);
|
|
2385
|
+
}
|
|
2386
|
+
Cartes.CloseRing2 = CloseRing2;
|
|
2387
|
+
/**
|
|
2388
|
+
* Closes given ring by adding the first point to the end of the array.
|
|
2389
|
+
* This will mutate the given array.
|
|
2390
|
+
* Will not do anything if the ring is already closed.
|
|
2391
|
+
* @param points
|
|
2392
|
+
* @returns
|
|
2393
|
+
*/
|
|
2394
|
+
function CloseRing3(points) {
|
|
2395
|
+
if (points.length < 2) {
|
|
2396
|
+
return;
|
|
2397
|
+
}
|
|
2398
|
+
else if (IsRing3Closed(points)) {
|
|
2399
|
+
return;
|
|
2400
|
+
}
|
|
2401
|
+
points.push(points[0]);
|
|
2402
|
+
}
|
|
2403
|
+
Cartes.CloseRing3 = CloseRing3;
|
|
2336
2404
|
})(exports.Cartes || (exports.Cartes = {}));
|
|
2337
2405
|
|
|
2338
2406
|
/**
|
|
@@ -6924,147 +6992,175 @@
|
|
|
6924
6992
|
* Description of a "Markup" which is stored in custom-form or bookmark records.
|
|
6925
6993
|
*/
|
|
6926
6994
|
(function (Markup) {
|
|
6927
|
-
var
|
|
6928
|
-
(function (
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6995
|
+
var Div;
|
|
6996
|
+
(function (Div) {
|
|
6997
|
+
// Types of div that can be created.
|
|
6998
|
+
var EType;
|
|
6999
|
+
(function (EType) {
|
|
7000
|
+
// Default, no special handling.
|
|
7001
|
+
EType["Default"] = "default";
|
|
7002
|
+
// Callout, assumes it will be positioned in 3d space.
|
|
7003
|
+
// Assumes existence of line that is used to anchor it.
|
|
7004
|
+
EType["Callout"] = "callout";
|
|
7005
|
+
})(EType = Div.EType || (Div.EType = {}));
|
|
7006
|
+
// Describes expected content of a row cell.
|
|
7007
|
+
var EItemType;
|
|
7008
|
+
(function (EItemType) {
|
|
7009
|
+
// Default, no special handling.
|
|
7010
|
+
EItemType["Default"] = "DEFAULT";
|
|
7011
|
+
// Embed, assume content is html.
|
|
7012
|
+
// Make it take over the whole cell instead of padding it and such.
|
|
7013
|
+
EItemType["Embed"] = "EMBED";
|
|
7014
|
+
})(EItemType = Div.EItemType || (Div.EItemType = {}));
|
|
7015
|
+
var ItemAction;
|
|
7016
|
+
(function (ItemAction) {
|
|
7017
|
+
// Types of actions that can be performed when a cell is clicked.
|
|
7018
|
+
// Null = "NONE".
|
|
6932
7019
|
var EType;
|
|
6933
7020
|
(function (EType) {
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
//
|
|
6938
|
-
EType["
|
|
6939
|
-
|
|
6940
|
-
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
//
|
|
6944
|
-
|
|
6945
|
-
//
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
|
|
7016
|
-
|
|
7017
|
-
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7025
|
-
|
|
7026
|
-
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7035
|
-
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
|
|
7042
|
-
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7049
|
-
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
|
|
7057
|
-
|
|
7058
|
-
|
|
7059
|
-
|
|
7060
|
-
|
|
7061
|
-
|
|
7062
|
-
|
|
7063
|
-
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
|
|
7067
|
-
|
|
7021
|
+
EType["None"] = "NONE";
|
|
7022
|
+
// Open a link specified in params.
|
|
7023
|
+
EType["OpenLink"] = "LINK";
|
|
7024
|
+
// Open the markup's entity's details panel.
|
|
7025
|
+
EType["OpenInfoView"] = "INFOVIEW";
|
|
7026
|
+
// Open the markup's entity's gallery popup.
|
|
7027
|
+
EType["OpenEntityGallery"] = "GALLERY";
|
|
7028
|
+
// Toggle visibility of the markup's entity's relationships.
|
|
7029
|
+
EType["ToggleRelationships"] = "RELATIONSHIPS";
|
|
7030
|
+
// Dictates this cell can be used to drag the div around.
|
|
7031
|
+
EType["Draggable"] = "DRAGABBLE";
|
|
7032
|
+
// Closes the markup.
|
|
7033
|
+
EType["Close"] = "CLOSE";
|
|
7034
|
+
// Opens a bookmark specified in params.
|
|
7035
|
+
EType["OpenBookmark"] = "BOOKMARK";
|
|
7036
|
+
})(EType = ItemAction.EType || (ItemAction.EType = {}));
|
|
7037
|
+
})(ItemAction = Div.ItemAction || (Div.ItemAction = {}));
|
|
7038
|
+
Div.DEFAULT = {
|
|
7039
|
+
contentRows: [
|
|
7040
|
+
{
|
|
7041
|
+
height: 100,
|
|
7042
|
+
items: [
|
|
7043
|
+
{
|
|
7044
|
+
contentType: EItemType.Default,
|
|
7045
|
+
text: "Type here...",
|
|
7046
|
+
width: 100,
|
|
7047
|
+
backgroundColor: "white",
|
|
7048
|
+
fontColor: "black",
|
|
7049
|
+
textAlign: "center",
|
|
7050
|
+
verticalAlign: "center",
|
|
7051
|
+
fontSize: 15
|
|
7052
|
+
}
|
|
7053
|
+
]
|
|
7054
|
+
}
|
|
7055
|
+
],
|
|
7056
|
+
height: null,
|
|
7057
|
+
width: null,
|
|
7058
|
+
id: null,
|
|
7059
|
+
x: null,
|
|
7060
|
+
y: null,
|
|
7061
|
+
borderColor: "black",
|
|
7062
|
+
borderWidth: 1,
|
|
7063
|
+
borderUsingPercent: false,
|
|
7064
|
+
borderRadius: 8,
|
|
7065
|
+
type: EType.Default
|
|
7066
|
+
};
|
|
7067
|
+
})(Div = Markup.Div || (Markup.Div = {}));
|
|
7068
|
+
var Drawing;
|
|
7069
|
+
(function (Drawing) {
|
|
7070
|
+
// Describes a line end's head.
|
|
7071
|
+
var EHeadStyle;
|
|
7072
|
+
(function (EHeadStyle) {
|
|
7073
|
+
EHeadStyle["None"] = "NONE";
|
|
7074
|
+
EHeadStyle["Circle"] = "CIRCLE";
|
|
7075
|
+
EHeadStyle["Arrow"] = "ARROW";
|
|
7076
|
+
})(EHeadStyle = Drawing.EHeadStyle || (Drawing.EHeadStyle = {}));
|
|
7077
|
+
var Line;
|
|
7078
|
+
(function (Line) {
|
|
7079
|
+
// Dictates where on a DIV an anchor should snap to.
|
|
7080
|
+
var EAnchorDivSide;
|
|
7081
|
+
(function (EAnchorDivSide) {
|
|
7082
|
+
EAnchorDivSide[EAnchorDivSide["TopLeft"] = 0] = "TopLeft";
|
|
7083
|
+
EAnchorDivSide[EAnchorDivSide["TopRight"] = 1] = "TopRight";
|
|
7084
|
+
EAnchorDivSide[EAnchorDivSide["BottomLeft"] = 2] = "BottomLeft";
|
|
7085
|
+
EAnchorDivSide[EAnchorDivSide["BottomRight"] = 3] = "BottomRight";
|
|
7086
|
+
EAnchorDivSide[EAnchorDivSide["Center"] = 4] = "Center";
|
|
7087
|
+
EAnchorDivSide[EAnchorDivSide["CenterLeft"] = 5] = "CenterLeft";
|
|
7088
|
+
EAnchorDivSide[EAnchorDivSide["CenterRight"] = 6] = "CenterRight";
|
|
7089
|
+
EAnchorDivSide[EAnchorDivSide["CenterTop"] = 7] = "CenterTop";
|
|
7090
|
+
EAnchorDivSide[EAnchorDivSide["CenterBottom"] = 8] = "CenterBottom";
|
|
7091
|
+
})(EAnchorDivSide = Line.EAnchorDivSide || (Line.EAnchorDivSide = {}));
|
|
7092
|
+
// Dictates what end of the line an anchor should render on.
|
|
7093
|
+
var EAnchorLineSide;
|
|
7094
|
+
(function (EAnchorLineSide) {
|
|
7095
|
+
EAnchorLineSide[EAnchorLineSide["Start"] = 0] = "Start";
|
|
7096
|
+
EAnchorLineSide[EAnchorLineSide["End"] = 1] = "End";
|
|
7097
|
+
})(EAnchorLineSide = Line.EAnchorLineSide || (Line.EAnchorLineSide = {}));
|
|
7098
|
+
Line.DEFAULT = {
|
|
7099
|
+
brushColor: "rgba(255, 255, 255, 1)",
|
|
7100
|
+
brushSize: 4,
|
|
7101
|
+
path: null,
|
|
7102
|
+
pathType: "LINE",
|
|
7103
|
+
transform: null,
|
|
7104
|
+
snaps: null
|
|
7105
|
+
};
|
|
7106
|
+
})(Line = Drawing.Line || (Drawing.Line = {}));
|
|
7107
|
+
var FreePaint;
|
|
7108
|
+
(function (FreePaint) {
|
|
7109
|
+
FreePaint.DEFAULT = {
|
|
7110
|
+
brushColor: "rgba(255, 255, 255, 1)",
|
|
7111
|
+
brushSize: 4,
|
|
7112
|
+
path: null,
|
|
7113
|
+
pathType: "PLAIN",
|
|
7114
|
+
transform: null
|
|
7115
|
+
};
|
|
7116
|
+
})(FreePaint = Drawing.FreePaint || (Drawing.FreePaint = {}));
|
|
7117
|
+
})(Drawing = Markup.Drawing || (Markup.Drawing = {}));
|
|
7118
|
+
var Entity3d;
|
|
7119
|
+
(function (Entity3d) {
|
|
7120
|
+
var Polygon;
|
|
7121
|
+
(function (Polygon) {
|
|
7122
|
+
// Determines if terrain and 3d models should be overlapped or not.
|
|
7123
|
+
var EClassificationType;
|
|
7124
|
+
(function (EClassificationType) {
|
|
7125
|
+
// 3d models and terrain are overlapped.
|
|
7126
|
+
EClassificationType["Both"] = "BOTH";
|
|
7127
|
+
// Only terrain is overlapped.
|
|
7128
|
+
EClassificationType["Terrain"] = "TERRAIN";
|
|
7129
|
+
})(EClassificationType = Polygon.EClassificationType || (Polygon.EClassificationType = {}));
|
|
7130
|
+
Polygon.DEFAULT = {
|
|
7131
|
+
type: "POLYGON",
|
|
7132
|
+
id: null,
|
|
7133
|
+
positions: null,
|
|
7134
|
+
color: "rgba(254, 234, 57, 0.54)",
|
|
7135
|
+
outlineColor: "rgba(215, 215, 215, 0)",
|
|
7136
|
+
outlineWidth: 2,
|
|
7137
|
+
extrudedHeight: 0,
|
|
7138
|
+
classificationType: EClassificationType.Both,
|
|
7139
|
+
smoothen: 0
|
|
7140
|
+
};
|
|
7141
|
+
})(Polygon = Entity3d.Polygon || (Entity3d.Polygon = {}));
|
|
7142
|
+
var Polyline;
|
|
7143
|
+
(function (Polyline) {
|
|
7144
|
+
Polyline.DEFAULT = {
|
|
7145
|
+
type: "POLYLINE",
|
|
7146
|
+
id: null,
|
|
7147
|
+
positions: null,
|
|
7148
|
+
color: "rgba(254, 234, 57, 0.54)",
|
|
7149
|
+
outlineWidth: 4,
|
|
7150
|
+
smoothen: 0
|
|
7151
|
+
};
|
|
7152
|
+
})(Polyline = Entity3d.Polyline || (Entity3d.Polyline = {}));
|
|
7153
|
+
var Circle;
|
|
7154
|
+
(function (Circle) {
|
|
7155
|
+
Circle.DEFAULT = {
|
|
7156
|
+
type: "CIRCLE",
|
|
7157
|
+
id: null,
|
|
7158
|
+
position: null,
|
|
7159
|
+
radius: 50,
|
|
7160
|
+
color: "rgba(254, 234, 57, 0.54)"
|
|
7161
|
+
};
|
|
7162
|
+
})(Circle = Entity3d.Circle || (Entity3d.Circle = {}));
|
|
7163
|
+
})(Entity3d = Markup.Entity3d || (Markup.Entity3d = {}));
|
|
7068
7164
|
})(exports.Markup || (exports.Markup = {}));
|
|
7069
7165
|
|
|
7070
7166
|
exports.AbstractApi = AbstractApi;
|