bruce-models 0.8.7 → 0.8.9
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 +104 -8
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +104 -8
- 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 +36 -8
- package/dist/lib/markup/markup.js.map +1 -1
- package/dist/lib/project/project-view-bookmark.js.map +1 -1
- package/dist/types/common/cartes.d.ts +32 -0
- package/dist/types/markup/markup.d.ts +15 -11
- package/dist/types/project/project-view-bookmark.d.ts +1 -0
- 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
|
/**
|
|
@@ -7182,9 +7250,45 @@ var Markup;
|
|
|
7182
7250
|
EType["OpenBookmark"] = "BOOKMARK";
|
|
7183
7251
|
})(EType = ItemAction.EType || (ItemAction.EType = {}));
|
|
7184
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
|
+
};
|
|
7185
7282
|
})(Div = Markup.Div || (Markup.Div = {}));
|
|
7186
7283
|
var Drawing;
|
|
7187
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 = {}));
|
|
7188
7292
|
var Line;
|
|
7189
7293
|
(function (Line) {
|
|
7190
7294
|
// Dictates where on a DIV an anchor should snap to.
|
|
@@ -7206,14 +7310,6 @@ var Markup;
|
|
|
7206
7310
|
EAnchorLineSide[EAnchorLineSide["Start"] = 0] = "Start";
|
|
7207
7311
|
EAnchorLineSide[EAnchorLineSide["End"] = 1] = "End";
|
|
7208
7312
|
})(EAnchorLineSide = Line.EAnchorLineSide || (Line.EAnchorLineSide = {}));
|
|
7209
|
-
// Types of anchor heads when anchor is used in context of a line.
|
|
7210
|
-
// None means the anchor is transparent.
|
|
7211
|
-
var EAnchorHeadStyle;
|
|
7212
|
-
(function (EAnchorHeadStyle) {
|
|
7213
|
-
EAnchorHeadStyle["None"] = "NONE";
|
|
7214
|
-
EAnchorHeadStyle["Circle"] = "CIRCLE";
|
|
7215
|
-
EAnchorHeadStyle["Arrow"] = "ARROW";
|
|
7216
|
-
})(EAnchorHeadStyle = Line.EAnchorHeadStyle || (Line.EAnchorHeadStyle = {}));
|
|
7217
7313
|
Line.DEFAULT = {
|
|
7218
7314
|
brushColor: "rgba(255, 255, 255, 1)",
|
|
7219
7315
|
brushSize: 4,
|