@aurigma/design-atoms-model 7.0.34 → 7.0.37
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/Collection.js +271 -514
- package/Collection.js.map +1 -1
- package/Colors/CmykColor.js +35 -69
- package/Colors/CmykColor.js.map +1 -1
- package/Colors/Color.js +11 -19
- package/Colors/Color.js.map +1 -1
- package/Colors/GrayscaleColor.js +23 -45
- package/Colors/GrayscaleColor.js.map +1 -1
- package/Colors/HsbColor.js +67 -85
- package/Colors/HsbColor.js.map +1 -1
- package/Colors/Ink.js +20 -35
- package/Colors/Ink.js.map +1 -1
- package/Colors/LabColor.js +29 -59
- package/Colors/LabColor.js.map +1 -1
- package/Colors/Palette.js +2 -21
- package/Colors/Palette.js.map +1 -1
- package/Colors/ProcessColor.js +24 -54
- package/Colors/ProcessColor.js.map +1 -1
- package/Colors/RgbColor.js +31 -61
- package/Colors/RgbColor.js.map +1 -1
- package/Colors/RgbColors.js +22 -54
- package/Colors/RgbColors.js.map +1 -1
- package/Colors/SpotColor.js +34 -68
- package/Colors/SpotColor.js.map +1 -1
- package/Colors/Swatch.js +16 -40
- package/Colors/Swatch.js.map +1 -1
- package/Colors/ValidationUtils.js +3 -5
- package/Colors/ValidationUtils.js.map +1 -1
- package/ColorsOld/CmykColor.js +54 -80
- package/ColorsOld/CmykColor.js.map +1 -1
- package/ColorsOld/Color.d.ts +1 -1
- package/ColorsOld/Color.js +25 -34
- package/ColorsOld/Color.js.map +1 -1
- package/ColorsOld/ColorFactory.js +30 -40
- package/ColorsOld/ColorFactory.js.map +1 -1
- package/ColorsOld/GrayscaleColor.js +29 -54
- package/ColorsOld/GrayscaleColor.js.map +1 -1
- package/ColorsOld/HsbColor.js +29 -35
- package/ColorsOld/HsbColor.js.map +1 -1
- package/ColorsOld/LabColor.js +35 -56
- package/ColorsOld/LabColor.js.map +1 -1
- package/ColorsOld/RgbColor.js +73 -114
- package/ColorsOld/RgbColor.js.map +1 -1
- package/ColorsOld/SpotColor.js +32 -53
- package/ColorsOld/SpotColor.js.map +1 -1
- package/ColorsOld/Utils.js +9 -13
- package/ColorsOld/Utils.js.map +1 -1
- package/Configuration/IRenderingConfig.js +1 -0
- package/Configuration/WatermarkConfig.js +17 -33
- package/Configuration/WatermarkConfig.js.map +1 -1
- package/Configuration/index.js +1 -0
- package/Configuration/index.js.map +1 -1
- package/Configuration.js +7 -11
- package/Configuration.js.map +1 -1
- package/EquatableKeyDictionary.js +43 -127
- package/EquatableKeyDictionary.js.map +1 -1
- package/EventObject.js +59 -136
- package/EventObject.js.map +1 -1
- package/Exception.d.ts +1 -1
- package/Exception.js +47 -88
- package/Exception.js.map +1 -1
- package/INotifyPropertyChanged.d.ts +1 -1
- package/INotifyPropertyChanged.js +1 -0
- package/Math/Array.js +3 -3
- package/Math/Array.js.map +1 -1
- package/Math/Common.js +13 -15
- package/Math/Common.js.map +1 -1
- package/Math/ILtrb.js +1 -0
- package/Math/IPoint.js +1 -0
- package/Math/ISize.js +1 -0
- package/Math/Margin.js +62 -99
- package/Math/Margin.js.map +1 -1
- package/Math/Matrix.js +63 -94
- package/Math/Matrix.js.map +1 -1
- package/Math/Path.d.ts +1 -1
- package/Math/Path.js +149 -234
- package/Math/Path.js.map +1 -1
- package/Math/PointF.js +31 -34
- package/Math/PointF.js.map +1 -1
- package/Math/RectangleF.js +119 -159
- package/Math/RectangleF.js.map +1 -1
- package/Math/RotatedRectangleF.js +132 -147
- package/Math/RotatedRectangleF.js.map +1 -1
- package/Math/SizeF.js +10 -12
- package/Math/SizeF.js.map +1 -1
- package/Math/Transform.js +50 -80
- package/Math/Transform.js.map +1 -1
- package/Math/index.js +3 -0
- package/Math/index.js.map +1 -1
- package/Product/Constraints/ContainerConstraints.js +11 -13
- package/Product/Constraints/ContainerConstraints.js.map +1 -1
- package/Product/Constraints/MaxArtworkSizeConstraints.d.ts +1 -1
- package/Product/Constraints/MaxArtworkSizeConstraints.js +10 -12
- package/Product/Constraints/MaxArtworkSizeConstraints.js.map +1 -1
- package/Product/Constraints/PrintingTechniqueConstraints.js +10 -13
- package/Product/Constraints/PrintingTechniqueConstraints.js.map +1 -1
- package/Product/Container.d.ts +10 -10
- package/Product/Container.js +253 -375
- package/Product/Container.js.map +1 -1
- package/Product/ContainerVisualization.d.ts +1 -0
- package/Product/ContainerVisualization.js +31 -56
- package/Product/ContainerVisualization.js.map +1 -1
- package/Product/Convert/CornerRadiusConverter.js +32 -34
- package/Product/Convert/CornerRadiusConverter.js.map +1 -1
- package/Product/CropMark.js +28 -40
- package/Product/CropMark.js.map +1 -1
- package/Product/Decorators/Factory/AbstractFactory.js +13 -23
- package/Product/Decorators/Factory/AbstractFactory.js.map +1 -1
- package/Product/Decorators/Factory/CollectionFactory.js +10 -45
- package/Product/Decorators/Factory/CollectionFactory.js.map +1 -1
- package/Product/Decorators/Factory/ColorFactory.js +13 -35
- package/Product/Decorators/Factory/ColorFactory.js.map +1 -1
- package/Product/Decorators/Factory/ObjectFactory.js +10 -45
- package/Product/Decorators/Factory/ObjectFactory.js.map +1 -1
- package/Product/Decorators/Factory/SimpleFactory.js +11 -21
- package/Product/Decorators/Factory/SimpleFactory.js.map +1 -1
- package/Product/Decorators/Interfaces/IInputPropertyMetadata.d.ts +1 -1
- package/Product/Decorators/Interfaces/IInputPropertyMetadata.js +1 -0
- package/Product/Decorators/Interfaces/IObjectMetadata.js +1 -0
- package/Product/Decorators/Interfaces/IPropertyMetadata.js +1 -0
- package/Product/Decorators/ItemsMetadata.js +11 -13
- package/Product/Decorators/ItemsMetadata.js.map +1 -1
- package/Product/Decorators/Property.js +4 -4
- package/Product/Decorators/Property.js.map +1 -1
- package/Product/Decorators/PropertyChanged.js +1 -1
- package/Product/Decorators/PropertyChanged.js.map +1 -1
- package/Product/Decorators/index.js +1 -0
- package/Product/Decorators/index.js.map +1 -1
- package/Product/Effects/ColorDictionaryEntry.js +3 -5
- package/Product/Effects/ColorDictionaryEntry.js.map +1 -1
- package/Product/Effects/NDEffectParameters.js +2 -6
- package/Product/Effects/NDEffectParameters.js.map +1 -1
- package/Product/Effects/NDEffects.d.ts +1 -0
- package/Product/Effects/NDEffects.js +20 -27
- package/Product/Effects/NDEffects.js.map +1 -1
- package/Product/Effects/RecolorEffectParameters.d.ts +1 -0
- package/Product/Effects/RecolorEffectParameters.js +44 -89
- package/Product/Effects/RecolorEffectParameters.js.map +1 -1
- package/Product/IGetAllItemsOptions.js +1 -0
- package/Product/InteractiveZone.js +34 -66
- package/Product/InteractiveZone.js.map +1 -1
- package/Product/Interfaces/IColorWithTitle.js +1 -0
- package/Product/Interfaces/IDataSet.js +1 -0
- package/Product/Interfaces/IFontSettings.js +1 -0
- package/Product/Interfaces/IItemData.js +1 -0
- package/Product/Interfaces/IPdfMetadata.js +1 -0
- package/Product/Interfaces/IProductThemeConfig.js +1 -0
- package/Product/Interfaces/IShadowSettings.js +1 -0
- package/Product/Interfaces/IStrokeSettings.js +1 -0
- package/Product/Interfaces/index.js +3 -0
- package/Product/Interfaces/index.js.map +1 -1
- package/Product/ItemMask.js +20 -26
- package/Product/ItemMask.js.map +1 -1
- package/Product/Items/ArchedTextItem.js +65 -100
- package/Product/Items/ArchedTextItem.js.map +1 -1
- package/Product/Items/AutoScaledTextItem.js +35 -62
- package/Product/Items/AutoScaledTextItem.js.map +1 -1
- package/Product/Items/BarcodeData.d.ts +1 -1
- package/Product/Items/BarcodeData.js +62 -91
- package/Product/Items/BarcodeData.js.map +1 -1
- package/Product/Items/BarcodeItem.js +249 -298
- package/Product/Items/BarcodeItem.js.map +1 -1
- package/Product/Items/BarcodePermissions.js +38 -52
- package/Product/Items/BarcodePermissions.js.map +1 -1
- package/Product/Items/BaseItem.js +30 -53
- package/Product/Items/BaseItem.js.map +1 -1
- package/Product/Items/BaseTextItem.d.ts +2 -2
- package/Product/Items/BaseTextItem.js +451 -625
- package/Product/Items/BaseTextItem.js.map +1 -1
- package/Product/Items/BoundedTextItem.js +184 -255
- package/Product/Items/BoundedTextItem.js.map +1 -1
- package/Product/Items/ClipartItem.js +82 -175
- package/Product/Items/ClipartItem.js.map +1 -1
- package/Product/Items/ContentItem.js +52 -80
- package/Product/Items/ContentItem.js.map +1 -1
- package/Product/Items/ContentPermissions.js +36 -47
- package/Product/Items/ContentPermissions.js.map +1 -1
- package/Product/Items/CurvedTextItem.js +106 -158
- package/Product/Items/CurvedTextItem.js.map +1 -1
- package/Product/Items/DashedLineItem.js +45 -76
- package/Product/Items/DashedLineItem.js.map +1 -1
- package/Product/Items/EllipseItem.js +11 -31
- package/Product/Items/EllipseItem.js.map +1 -1
- package/Product/Items/FrontEndPermissions.js +20 -26
- package/Product/Items/FrontEndPermissions.js.map +1 -1
- package/Product/Items/GridItem.js +107 -162
- package/Product/Items/GridItem.js.map +1 -1
- package/Product/Items/GroupItem.js +95 -172
- package/Product/Items/GroupItem.js.map +1 -1
- package/Product/Items/GroupItemPermissions.js +42 -56
- package/Product/Items/GroupItemPermissions.js.map +1 -1
- package/Product/Items/ImageItem.d.ts +9 -4
- package/Product/Items/ImageItem.js +319 -430
- package/Product/Items/ImageItem.js.map +1 -1
- package/Product/Items/ImageMetaData.js +14 -15
- package/Product/Items/ImageMetaData.js.map +1 -1
- package/Product/Items/ImagePermissions.js +42 -56
- package/Product/Items/ImagePermissions.js.map +1 -1
- package/Product/Items/ImageViolationSettings.js +18 -35
- package/Product/Items/ImageViolationSettings.js.map +1 -1
- package/Product/Items/InStringPlaceholder.d.ts +2 -1
- package/Product/Items/InStringPlaceholder.js +52 -101
- package/Product/Items/InStringPlaceholder.js.map +1 -1
- package/Product/Items/Item.d.ts +1 -1
- package/Product/Items/Item.js +278 -370
- package/Product/Items/Item.js.map +1 -1
- package/Product/Items/ItemPermissions.js +54 -73
- package/Product/Items/ItemPermissions.js.map +1 -1
- package/Product/Items/ItemToolbarPermissions.js +61 -80
- package/Product/Items/ItemToolbarPermissions.js.map +1 -1
- package/Product/Items/LayoutItem.js +241 -326
- package/Product/Items/LayoutItem.js.map +1 -1
- package/Product/Items/LineItem.js +109 -156
- package/Product/Items/LineItem.js.map +1 -1
- package/Product/Items/LinePermissions.js +29 -39
- package/Product/Items/LinePermissions.js.map +1 -1
- package/Product/Items/ManipulationPermissions.d.ts +1 -1
- package/Product/Items/ManipulationPermissions.js +94 -135
- package/Product/Items/ManipulationPermissions.js.map +1 -1
- package/Product/Items/OpenTypeFeature.d.ts +1 -1
- package/Product/Items/OpenTypeFeature.js +3 -5
- package/Product/Items/OpenTypeFeature.js.map +1 -1
- package/Product/Items/OverlayEffect.js +56 -70
- package/Product/Items/OverlayEffect.js.map +1 -1
- package/Product/Items/ParagraphSettings.js +9 -11
- package/Product/Items/ParagraphSettings.js.map +1 -1
- package/Product/Items/PathBoundedTextItem.js +116 -166
- package/Product/Items/PathBoundedTextItem.js.map +1 -1
- package/Product/Items/PathBoundedTextPermissions.js +20 -26
- package/Product/Items/PathBoundedTextPermissions.js.map +1 -1
- package/Product/Items/PlaceholderItem.d.ts +1 -1
- package/Product/Items/PlaceholderItem.js +310 -419
- package/Product/Items/PlaceholderItem.js.map +1 -1
- package/Product/Items/PlaceholderPermissions.js +38 -47
- package/Product/Items/PlaceholderPermissions.js.map +1 -1
- package/Product/Items/PlainTextItem.js +45 -74
- package/Product/Items/PlainTextItem.js.map +1 -1
- package/Product/Items/PolylineItem.js +51 -81
- package/Product/Items/PolylineItem.js.map +1 -1
- package/Product/Items/RectangleItem.js +10 -30
- package/Product/Items/RectangleItem.js.map +1 -1
- package/Product/Items/ResizeGripsPermissions.d.ts +5 -4
- package/Product/Items/ResizeGripsPermissions.js +75 -94
- package/Product/Items/ResizeGripsPermissions.js.map +1 -1
- package/Product/Items/ShadowSettings.js +51 -69
- package/Product/Items/ShadowSettings.js.map +1 -1
- package/Product/Items/ShapeItem.js +182 -250
- package/Product/Items/ShapeItem.js.map +1 -1
- package/Product/Items/ShapePermissions.js +38 -52
- package/Product/Items/ShapePermissions.js.map +1 -1
- package/Product/Items/ShapeViolationSettings.js +18 -36
- package/Product/Items/ShapeViolationSettings.js.map +1 -1
- package/Product/Items/Size.js +7 -11
- package/Product/Items/Size.js.map +1 -1
- package/Product/Items/SmartItem.js +21 -41
- package/Product/Items/SmartItem.js.map +1 -1
- package/Product/Items/StrokeSettings.js +48 -62
- package/Product/Items/StrokeSettings.js.map +1 -1
- package/Product/Items/TextEnums.d.ts +2 -1
- package/Product/Items/TextEnums.js +1 -0
- package/Product/Items/TextEnums.js.map +1 -1
- package/Product/Items/TextPermissions.js +56 -58
- package/Product/Items/TextPermissions.js.map +1 -1
- package/Product/Items/TextViolationSettings.js +23 -40
- package/Product/Items/TextViolationSettings.js.map +1 -1
- package/Product/Items/ThemeBinding.d.ts +2 -1
- package/Product/Items/ThemeBinding.js +13 -15
- package/Product/Items/ThemeBinding.js.map +1 -1
- package/Product/Items/ViolationSettings.js +26 -44
- package/Product/Items/ViolationSettings.js.map +1 -1
- package/Product/Items/VisualizationPermissions.js +29 -39
- package/Product/Items/VisualizationPermissions.js.map +1 -1
- package/Product/ItemsData/ItemData.js +8 -24
- package/Product/ItemsData/ItemData.js.map +1 -1
- package/Product/ModelComponent.js +41 -63
- package/Product/ModelComponent.js.map +1 -1
- package/Product/PrintArea.d.ts +1 -0
- package/Product/PrintArea.js +132 -178
- package/Product/PrintArea.js.map +1 -1
- package/Product/Product.js +67 -105
- package/Product/Product.js.map +1 -1
- package/Product/SafetyLine.d.ts +1 -1
- package/Product/SafetyLine.js +90 -124
- package/Product/SafetyLine.js.map +1 -1
- package/Product/Surface.d.ts +2 -1
- package/Product/Surface.js +193 -287
- package/Product/Surface.js.map +1 -1
- package/Product/SurfaceMockup.js +40 -73
- package/Product/SurfaceMockup.js.map +1 -1
- package/Product/Uuid.js +19 -25
- package/Product/Uuid.js.map +1 -1
- package/Product/Watermark.js +5 -9
- package/Product/Watermark.js.map +1 -1
- package/Product/index.js +1 -0
- package/Product/index.js.map +1 -1
- package/Serialization/IProductSerializer.js +1 -0
- package/Utils/Environment.d.ts +1 -1
- package/Utils/Environment.js +24 -44
- package/Utils/Environment.js.map +1 -1
- package/Utils/Exceptions.js +5 -5
- package/Utils/Exceptions.js.map +1 -1
- package/Utils/Items.js +19 -19
- package/Utils/Items.js.map +1 -1
- package/Utils/Types/Action.d.ts +5 -1
- package/Utils/Types/Action.js +1 -0
- package/Utils/Types/AnyFunction.d.ts +1 -1
- package/Utils/Types/AnyFunction.js +1 -0
- package/Utils/Types/Func.d.ts +1 -1
- package/Utils/Types/Func.js +1 -0
- package/Utils/Types/index.js +3 -0
- package/Utils/Types/index.js.map +1 -1
- package/Utils/Utils.d.ts +14 -5
- package/Utils/Utils.js +185 -298
- package/Utils/Utils.js.map +1 -1
- package/Utils/debounce.d.ts +29 -0
- package/Utils/debounce.js +106 -0
- package/Utils/debounce.js.map +1 -0
- package/Utils/index.d.ts +2 -0
- package/Utils/index.js +3 -0
- package/Utils/index.js.map +1 -1
- package/Utils/throttle.d.ts +16 -0
- package/Utils/throttle.js +25 -0
- package/Utils/throttle.js.map +1 -0
- package/Validators/CmykComponentValidator.js +13 -15
- package/Validators/CmykComponentValidator.js.map +1 -1
- package/Version.d.ts +1 -1
- package/Version.js +1 -1
- package/Version.js.map +1 -1
- package/package.json +3 -8
- package/typings/structured-clone.d.ts +5 -0
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
extendStatics(d, b);
|
|
10
|
-
function __() { this.constructor = d; }
|
|
11
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
12
|
-
};
|
|
13
|
-
})();
|
|
14
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
15
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
16
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -20,383 +7,273 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
20
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
21
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
22
9
|
};
|
|
23
|
-
var __values = (this && this.__values) || function(o) {
|
|
24
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
25
|
-
if (m) return m.call(o);
|
|
26
|
-
if (o && typeof o.length === "number") return {
|
|
27
|
-
next: function () {
|
|
28
|
-
if (o && i >= o.length) o = void 0;
|
|
29
|
-
return { value: o && o[i++], done: !o };
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
33
|
-
};
|
|
34
10
|
import { RectangleItem } from "./RectangleItem";
|
|
35
11
|
import { Color, RgbColors } from "../../Colors";
|
|
36
12
|
import { StrokeSettings } from "./StrokeSettings";
|
|
37
13
|
import { ShadowSettings } from "./ShadowSettings";
|
|
38
14
|
import { TextPermissions } from "./TextPermissions";
|
|
39
15
|
import { ArgumentException } from "../../Exception";
|
|
40
|
-
import
|
|
41
|
-
import * as _ from "underscore";
|
|
42
|
-
import * as Math from "../../Math/index";
|
|
16
|
+
import { EqualsOfFloatNumbers } from "../../Math/index";
|
|
43
17
|
import { TextAlignment } from "./TextEnums";
|
|
44
18
|
import { EventWithSenderArg } from "../../EventObject";
|
|
45
19
|
import { Collection } from "../../Collection";
|
|
46
|
-
import { equals,
|
|
20
|
+
import { equals, isValidXml, isEqual } from "../../Utils/Utils";
|
|
47
21
|
import { Property } from "../Decorators/Property";
|
|
48
22
|
import { SimplePropertyFactory, ObjectPropertyFactory } from "../Decorators/Factory";
|
|
49
23
|
import { ModelComponent } from "../ModelComponent";
|
|
50
24
|
import { TextViolationSettings } from "./TextViolationSettings";
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
};
|
|
84
|
-
_this._onShadowPropertyChanged = function (s, p) {
|
|
85
|
-
_this._propertyChanged.notify(_this, "shadow");
|
|
86
|
-
};
|
|
87
|
-
_this._onStrokePropertyChanged = function (s, p) {
|
|
88
|
-
_this._propertyChanged.notify(_this, "stroke");
|
|
25
|
+
import { arraysIsEqual } from "@aurigma/utils-js/algorithms/array";
|
|
26
|
+
export class BaseTextItem extends RectangleItem {
|
|
27
|
+
constructor(text, fontPostScriptName, fontSize) {
|
|
28
|
+
super();
|
|
29
|
+
this._text = "";
|
|
30
|
+
this._originalText = "";
|
|
31
|
+
this._underline = false;
|
|
32
|
+
this._color = RgbColors.black;
|
|
33
|
+
this._alignment = TextAlignment.Left;
|
|
34
|
+
this._tracking = 0;
|
|
35
|
+
this._leading = 0;
|
|
36
|
+
this._checkTextCrop = true;
|
|
37
|
+
this._overlapLinesEnabled = false;
|
|
38
|
+
this._verticalScale = 1;
|
|
39
|
+
this._horizontalScale = 1;
|
|
40
|
+
this._stroke = null;
|
|
41
|
+
this._shadow = null;
|
|
42
|
+
this._previewScale = 1;
|
|
43
|
+
this._placeholders = new Collection();
|
|
44
|
+
this._displayText = null;
|
|
45
|
+
this._colorPalette = new Collection();
|
|
46
|
+
this._baselineShift = 0;
|
|
47
|
+
this._overprintText = false;
|
|
48
|
+
this.values = [];
|
|
49
|
+
this._characterLimit = null;
|
|
50
|
+
this._maxLineLength = null;
|
|
51
|
+
this._maxLineCount = null;
|
|
52
|
+
this.isTextPlaceholder = false;
|
|
53
|
+
this.textColorForAbnormalRendering = RgbColors.black;
|
|
54
|
+
this.type = BaseTextItem.type;
|
|
55
|
+
this._onFontPropertyChanged = (s, p) => {
|
|
56
|
+
this._propertyChanged.notify(this, "font");
|
|
89
57
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
_this.text = (text != null) ? text : "";
|
|
93
|
-
_this._font = new BaseTextItem.FontSettings(fontPostScriptName, (fontSize != null) ? fontSize : 10);
|
|
94
|
-
_this._subscribeFontPropertyChanged();
|
|
95
|
-
_this.textPermissions = new TextPermissions();
|
|
96
|
-
_this._setViolationSettings(new TextViolationSettings(), true);
|
|
97
|
-
var textUpdatedFunc = function () {
|
|
98
|
-
_this._displayText = null;
|
|
99
|
-
_this._propertyChanged.notify(_this, "text");
|
|
58
|
+
this._onShadowPropertyChanged = (s, p) => {
|
|
59
|
+
this._propertyChanged.notify(this, "shadow");
|
|
100
60
|
};
|
|
101
|
-
|
|
102
|
-
_this._placeholders.add_itemRemoved(function (data) { return data.item.removePropertyChanged(textUpdatedFunc); });
|
|
103
|
-
_this._ignorePermissionsChange = true;
|
|
104
|
-
_this.itemPermissions.allowRemoveOnLayoutChange = true;
|
|
105
|
-
_this.itemPermissions.itemToolbarPermissions.showEditButton = true;
|
|
106
|
-
_this._ignorePermissionsChange = false;
|
|
107
|
-
return _this;
|
|
108
|
-
}
|
|
109
|
-
Object.defineProperty(BaseTextItem.prototype, "characterLimit", {
|
|
110
|
-
get: function () {
|
|
111
|
-
return this._characterLimit;
|
|
112
|
-
},
|
|
113
|
-
set: function (value) {
|
|
114
|
-
if (Math.EqualsOfFloatNumbers(this._characterLimit, value))
|
|
115
|
-
return;
|
|
116
|
-
this._characterLimit = value;
|
|
117
|
-
if (value != null)
|
|
118
|
-
this._propertyChanged.notify(this, "characterLimit");
|
|
119
|
-
},
|
|
120
|
-
enumerable: true,
|
|
121
|
-
configurable: true
|
|
122
|
-
});
|
|
123
|
-
Object.defineProperty(BaseTextItem.prototype, "maxLineCount", {
|
|
124
|
-
get: function () {
|
|
125
|
-
return this._maxLineCount;
|
|
126
|
-
},
|
|
127
|
-
set: function (value) {
|
|
128
|
-
if (this._maxLineCount === value)
|
|
129
|
-
return;
|
|
130
|
-
this._maxLineCount = value;
|
|
131
|
-
this._displayText = null;
|
|
132
|
-
this._propertyChanged.notify(this, "maxLineCount");
|
|
133
|
-
},
|
|
134
|
-
enumerable: true,
|
|
135
|
-
configurable: true
|
|
136
|
-
});
|
|
137
|
-
Object.defineProperty(BaseTextItem.prototype, "maxLineLength", {
|
|
138
|
-
get: function () {
|
|
139
|
-
return this._maxLineLength;
|
|
140
|
-
},
|
|
141
|
-
set: function (value) {
|
|
142
|
-
if (this._maxLineLength === value)
|
|
143
|
-
return;
|
|
144
|
-
this._maxLineLength = value;
|
|
145
|
-
this._displayText = null;
|
|
146
|
-
this._propertyChanged.notify(this, "maxLineLength");
|
|
147
|
-
},
|
|
148
|
-
enumerable: true,
|
|
149
|
-
configurable: true
|
|
150
|
-
});
|
|
151
|
-
Object.defineProperty(BaseTextItem.prototype, "previewScale", {
|
|
152
|
-
get: function () { return this._previewScale; },
|
|
153
|
-
set: function (value) {
|
|
154
|
-
if (Math.EqualsOfFloatNumbers(this._previewScale, value))
|
|
155
|
-
return;
|
|
156
|
-
this._previewScale = value;
|
|
157
|
-
this._propertyChanged.notify(this, "previewScale");
|
|
158
|
-
},
|
|
159
|
-
enumerable: true,
|
|
160
|
-
configurable: true
|
|
161
|
-
});
|
|
162
|
-
Object.defineProperty(BaseTextItem.prototype, "stroke", {
|
|
163
|
-
get: function () {
|
|
164
|
-
return this._stroke;
|
|
165
|
-
},
|
|
166
|
-
set: function (value) {
|
|
167
|
-
if (StrokeSettings.equals(this._stroke, value))
|
|
168
|
-
return;
|
|
169
|
-
this._unsubscribeStrokePropertyChanged();
|
|
170
|
-
this._stroke = value;
|
|
171
|
-
this._subscribeStrokePropertyChanged();
|
|
61
|
+
this._onStrokePropertyChanged = (s, p) => {
|
|
172
62
|
this._propertyChanged.notify(this, "stroke");
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
if (this._shadow == null && value == null || (value != null && value.equals(this._shadow)))
|
|
183
|
-
return;
|
|
184
|
-
this._unsubscribeShadowPropertyChanged();
|
|
185
|
-
this._shadow = value;
|
|
186
|
-
this._subscribeShadowPropertyChanged();
|
|
187
|
-
this._propertyChanged.notify(this, "shadow");
|
|
188
|
-
},
|
|
189
|
-
enumerable: true,
|
|
190
|
-
configurable: true
|
|
191
|
-
});
|
|
192
|
-
Object.defineProperty(BaseTextItem.prototype, "horizontalScale", {
|
|
193
|
-
get: function () { return this._horizontalScale; },
|
|
194
|
-
set: function (value) {
|
|
195
|
-
if (Math.EqualsOfFloatNumbers(this._horizontalScale, value))
|
|
196
|
-
return;
|
|
197
|
-
this._horizontalScale = value;
|
|
198
|
-
this._propertyChanged.notify(this, "horizontalScale");
|
|
199
|
-
},
|
|
200
|
-
enumerable: true,
|
|
201
|
-
configurable: true
|
|
202
|
-
});
|
|
203
|
-
Object.defineProperty(BaseTextItem.prototype, "verticalScale", {
|
|
204
|
-
get: function () { return this._verticalScale; },
|
|
205
|
-
set: function (value) {
|
|
206
|
-
if (Math.EqualsOfFloatNumbers(this._verticalScale, value))
|
|
207
|
-
return;
|
|
208
|
-
this._verticalScale = value;
|
|
209
|
-
this._propertyChanged.notify(this, "verticalScale");
|
|
210
|
-
},
|
|
211
|
-
enumerable: true,
|
|
212
|
-
configurable: true
|
|
213
|
-
});
|
|
214
|
-
Object.defineProperty(BaseTextItem.prototype, "checkTextCrop", {
|
|
215
|
-
get: function () { return this._checkTextCrop; },
|
|
216
|
-
set: function (value) {
|
|
217
|
-
if (this._checkTextCrop === value)
|
|
218
|
-
return;
|
|
219
|
-
this._checkTextCrop = value;
|
|
220
|
-
this._propertyChanged.notify(this, "checkTextCrop");
|
|
221
|
-
},
|
|
222
|
-
enumerable: true,
|
|
223
|
-
configurable: true
|
|
224
|
-
});
|
|
225
|
-
Object.defineProperty(BaseTextItem.prototype, "overlapLinesEnabled", {
|
|
226
|
-
get: function () { return this._overlapLinesEnabled; },
|
|
227
|
-
set: function (value) {
|
|
228
|
-
if (this._overlapLinesEnabled === value)
|
|
229
|
-
return;
|
|
230
|
-
this._overlapLinesEnabled = value;
|
|
231
|
-
this._propertyChanged.notify(this, "overlapLinesEnabled");
|
|
232
|
-
},
|
|
233
|
-
enumerable: true,
|
|
234
|
-
configurable: true
|
|
235
|
-
});
|
|
236
|
-
Object.defineProperty(BaseTextItem.prototype, "alignment", {
|
|
237
|
-
get: function () { return this._alignment; },
|
|
238
|
-
set: function (value) {
|
|
239
|
-
if (this._alignment === value)
|
|
240
|
-
return;
|
|
241
|
-
this._alignment = value;
|
|
242
|
-
this._propertyChanged.notify(this, "alignment");
|
|
243
|
-
},
|
|
244
|
-
enumerable: true,
|
|
245
|
-
configurable: true
|
|
246
|
-
});
|
|
247
|
-
Object.defineProperty(BaseTextItem.prototype, "tracking", {
|
|
248
|
-
get: function () { return this._tracking; },
|
|
249
|
-
set: function (value) {
|
|
250
|
-
if (Math.EqualsOfFloatNumbers(this._tracking, value))
|
|
251
|
-
return;
|
|
252
|
-
this._tracking = value;
|
|
253
|
-
this._propertyChanged.notify(this, "tracking");
|
|
254
|
-
},
|
|
255
|
-
enumerable: true,
|
|
256
|
-
configurable: true
|
|
257
|
-
});
|
|
258
|
-
Object.defineProperty(BaseTextItem.prototype, "leading", {
|
|
259
|
-
get: function () { return this._leading; },
|
|
260
|
-
set: function (value) {
|
|
261
|
-
if (Math.EqualsOfFloatNumbers(this._leading, value))
|
|
262
|
-
return;
|
|
263
|
-
this._leading = value;
|
|
264
|
-
this._propertyChanged.notify(this, "leading");
|
|
265
|
-
},
|
|
266
|
-
enumerable: true,
|
|
267
|
-
configurable: true
|
|
268
|
-
});
|
|
269
|
-
Object.defineProperty(BaseTextItem.prototype, "originalText", {
|
|
270
|
-
get: function () {
|
|
271
|
-
return this._originalText != null ? this._originalText : "";
|
|
272
|
-
},
|
|
273
|
-
set: function (value) {
|
|
274
|
-
this._originalText = value;
|
|
275
|
-
},
|
|
276
|
-
enumerable: true,
|
|
277
|
-
configurable: true
|
|
278
|
-
});
|
|
279
|
-
Object.defineProperty(BaseTextItem.prototype, "underline", {
|
|
280
|
-
get: function () { return this._underline; },
|
|
281
|
-
set: function (value) {
|
|
282
|
-
if (this._underline === value)
|
|
283
|
-
return;
|
|
284
|
-
this._underline = value;
|
|
285
|
-
this._propertyChanged.notify(this, "underline");
|
|
286
|
-
},
|
|
287
|
-
enumerable: true,
|
|
288
|
-
configurable: true
|
|
289
|
-
});
|
|
290
|
-
Object.defineProperty(BaseTextItem.prototype, "font", {
|
|
291
|
-
get: function () {
|
|
292
|
-
return this._font;
|
|
293
|
-
},
|
|
294
|
-
set: function (value) {
|
|
295
|
-
if (BaseTextItem.FontSettings.equals(this._font, value))
|
|
296
|
-
return;
|
|
297
|
-
this._unsubscribeFontPropertyChanged();
|
|
298
|
-
this._font = value;
|
|
299
|
-
this._subscribeFontPropertyChanged();
|
|
300
|
-
this._propertyChanged.notify(this, "font");
|
|
301
|
-
},
|
|
302
|
-
enumerable: true,
|
|
303
|
-
configurable: true
|
|
304
|
-
});
|
|
305
|
-
Object.defineProperty(BaseTextItem.prototype, "text", {
|
|
306
|
-
get: function () {
|
|
307
|
-
if (this._displayText == null)
|
|
308
|
-
this._displayText = this.getUpdatedText(this._text);
|
|
309
|
-
this._text = this._displayText;
|
|
310
|
-
return this._text;
|
|
311
|
-
},
|
|
312
|
-
set: function (value) {
|
|
313
|
-
if (this._text === value)
|
|
314
|
-
return;
|
|
315
|
-
this._text = value;
|
|
63
|
+
};
|
|
64
|
+
this.borderWidth = 0;
|
|
65
|
+
this.fillColor = RgbColors.transparent;
|
|
66
|
+
this.text = (text != null) ? text : "";
|
|
67
|
+
this._font = new BaseTextItem.FontSettings(fontPostScriptName, (fontSize != null) ? fontSize : 10);
|
|
68
|
+
this._subscribeFontPropertyChanged();
|
|
69
|
+
this.textPermissions = new TextPermissions();
|
|
70
|
+
this._setViolationSettings(new TextViolationSettings(), true);
|
|
71
|
+
var textUpdatedFunc = () => {
|
|
316
72
|
this._displayText = null;
|
|
317
73
|
this._propertyChanged.notify(this, "text");
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
74
|
+
};
|
|
75
|
+
this._placeholders.add_itemAdded(data => data.item.addPropertyChanged(textUpdatedFunc));
|
|
76
|
+
this._placeholders.add_itemRemoved(data => data.item.removePropertyChanged(textUpdatedFunc));
|
|
77
|
+
this._ignorePermissionsChange = true;
|
|
78
|
+
this.itemPermissions.allowRemoveOnLayoutChange = true;
|
|
79
|
+
this.itemPermissions.itemToolbarPermissions.showEditButton = true;
|
|
80
|
+
this._ignorePermissionsChange = false;
|
|
81
|
+
}
|
|
82
|
+
get characterLimit() {
|
|
83
|
+
return this._characterLimit;
|
|
84
|
+
}
|
|
85
|
+
set characterLimit(value) {
|
|
86
|
+
if (EqualsOfFloatNumbers(this._characterLimit, value))
|
|
87
|
+
return;
|
|
88
|
+
this._characterLimit = value;
|
|
89
|
+
if (value != null)
|
|
90
|
+
this._propertyChanged.notify(this, "characterLimit");
|
|
91
|
+
}
|
|
92
|
+
get maxLineCount() {
|
|
93
|
+
return this._maxLineCount;
|
|
94
|
+
}
|
|
95
|
+
set maxLineCount(value) {
|
|
96
|
+
if (this._maxLineCount === value)
|
|
97
|
+
return;
|
|
98
|
+
this._maxLineCount = value;
|
|
99
|
+
this._displayText = null;
|
|
100
|
+
this._propertyChanged.notify(this, "maxLineCount");
|
|
101
|
+
}
|
|
102
|
+
get maxLineLength() {
|
|
103
|
+
return this._maxLineLength;
|
|
104
|
+
}
|
|
105
|
+
set maxLineLength(value) {
|
|
106
|
+
if (this._maxLineLength === value)
|
|
107
|
+
return;
|
|
108
|
+
this._maxLineLength = value;
|
|
109
|
+
this._displayText = null;
|
|
110
|
+
this._propertyChanged.notify(this, "maxLineLength");
|
|
111
|
+
}
|
|
112
|
+
get previewScale() { return this._previewScale; }
|
|
113
|
+
set previewScale(value) {
|
|
114
|
+
if (EqualsOfFloatNumbers(this._previewScale, value))
|
|
115
|
+
return;
|
|
116
|
+
this._previewScale = value;
|
|
117
|
+
this._propertyChanged.notify(this, "previewScale");
|
|
118
|
+
}
|
|
119
|
+
get stroke() {
|
|
120
|
+
return this._stroke;
|
|
121
|
+
}
|
|
122
|
+
set stroke(value) {
|
|
123
|
+
if (StrokeSettings.equals(this._stroke, value))
|
|
124
|
+
return;
|
|
125
|
+
this._unsubscribeStrokePropertyChanged();
|
|
126
|
+
this._stroke = value;
|
|
127
|
+
this._subscribeStrokePropertyChanged();
|
|
128
|
+
this._propertyChanged.notify(this, "stroke");
|
|
129
|
+
}
|
|
130
|
+
get shadow() {
|
|
131
|
+
return this._shadow;
|
|
132
|
+
}
|
|
133
|
+
set shadow(value) {
|
|
134
|
+
if (this._shadow == null && value == null || (value != null && value.equals(this._shadow)))
|
|
135
|
+
return;
|
|
136
|
+
this._unsubscribeShadowPropertyChanged();
|
|
137
|
+
this._shadow = value;
|
|
138
|
+
this._subscribeShadowPropertyChanged();
|
|
139
|
+
this._propertyChanged.notify(this, "shadow");
|
|
140
|
+
}
|
|
141
|
+
get horizontalScale() { return this._horizontalScale; }
|
|
142
|
+
set horizontalScale(value) {
|
|
143
|
+
if (EqualsOfFloatNumbers(this._horizontalScale, value))
|
|
144
|
+
return;
|
|
145
|
+
this._horizontalScale = value;
|
|
146
|
+
this._propertyChanged.notify(this, "horizontalScale");
|
|
147
|
+
}
|
|
148
|
+
get verticalScale() { return this._verticalScale; }
|
|
149
|
+
set verticalScale(value) {
|
|
150
|
+
if (EqualsOfFloatNumbers(this._verticalScale, value))
|
|
151
|
+
return;
|
|
152
|
+
this._verticalScale = value;
|
|
153
|
+
this._propertyChanged.notify(this, "verticalScale");
|
|
154
|
+
}
|
|
155
|
+
get checkTextCrop() { return this._checkTextCrop; }
|
|
156
|
+
set checkTextCrop(value) {
|
|
157
|
+
if (this._checkTextCrop === value)
|
|
158
|
+
return;
|
|
159
|
+
this._checkTextCrop = value;
|
|
160
|
+
this._propertyChanged.notify(this, "checkTextCrop");
|
|
161
|
+
}
|
|
162
|
+
get overlapLinesEnabled() { return this._overlapLinesEnabled; }
|
|
163
|
+
set overlapLinesEnabled(value) {
|
|
164
|
+
if (this._overlapLinesEnabled === value)
|
|
165
|
+
return;
|
|
166
|
+
this._overlapLinesEnabled = value;
|
|
167
|
+
this._propertyChanged.notify(this, "overlapLinesEnabled");
|
|
168
|
+
}
|
|
169
|
+
get alignment() { return this._alignment; }
|
|
170
|
+
set alignment(value) {
|
|
171
|
+
if (this._alignment === value)
|
|
172
|
+
return;
|
|
173
|
+
this._alignment = value;
|
|
174
|
+
this._propertyChanged.notify(this, "alignment");
|
|
175
|
+
}
|
|
176
|
+
get tracking() { return this._tracking; }
|
|
177
|
+
set tracking(value) {
|
|
178
|
+
if (EqualsOfFloatNumbers(this._tracking, value))
|
|
179
|
+
return;
|
|
180
|
+
this._tracking = value;
|
|
181
|
+
this._propertyChanged.notify(this, "tracking");
|
|
182
|
+
}
|
|
183
|
+
get leading() { return this._leading; }
|
|
184
|
+
set leading(value) {
|
|
185
|
+
if (EqualsOfFloatNumbers(this._leading, value))
|
|
186
|
+
return;
|
|
187
|
+
this._leading = value;
|
|
188
|
+
this._propertyChanged.notify(this, "leading");
|
|
189
|
+
}
|
|
190
|
+
get originalText() {
|
|
191
|
+
return this._originalText != null ? this._originalText : "";
|
|
192
|
+
}
|
|
193
|
+
set originalText(value) {
|
|
194
|
+
this._originalText = value;
|
|
195
|
+
}
|
|
196
|
+
get underline() { return this._underline; }
|
|
197
|
+
set underline(value) {
|
|
198
|
+
if (this._underline === value)
|
|
199
|
+
return;
|
|
200
|
+
this._underline = value;
|
|
201
|
+
this._propertyChanged.notify(this, "underline");
|
|
202
|
+
}
|
|
203
|
+
get font() {
|
|
204
|
+
return this._font;
|
|
205
|
+
}
|
|
206
|
+
set font(value) {
|
|
207
|
+
if (BaseTextItem.FontSettings.equals(this._font, value))
|
|
208
|
+
return;
|
|
209
|
+
this._unsubscribeFontPropertyChanged();
|
|
210
|
+
this._font = value;
|
|
211
|
+
this._subscribeFontPropertyChanged();
|
|
212
|
+
this._propertyChanged.notify(this, "font");
|
|
213
|
+
}
|
|
214
|
+
get text() {
|
|
215
|
+
if (this._displayText == null)
|
|
216
|
+
this._displayText = this.getUpdatedText(this._text);
|
|
217
|
+
this._text = this._displayText;
|
|
218
|
+
return this._text;
|
|
219
|
+
}
|
|
220
|
+
set text(value) {
|
|
221
|
+
if (this._text === value)
|
|
222
|
+
return;
|
|
223
|
+
this._text = value;
|
|
224
|
+
this._displayText = null;
|
|
225
|
+
this._propertyChanged.notify(this, "text");
|
|
226
|
+
}
|
|
227
|
+
get color() { return this._color; }
|
|
228
|
+
set color(value) {
|
|
229
|
+
if (Color.equals(this._color, value))
|
|
230
|
+
return;
|
|
231
|
+
this._color = value;
|
|
232
|
+
this._propertyChanged.notify(this, "color");
|
|
233
|
+
}
|
|
234
|
+
get baselineShift() { return this._baselineShift; }
|
|
235
|
+
set baselineShift(value) {
|
|
236
|
+
if (EqualsOfFloatNumbers(this._baselineShift, value))
|
|
237
|
+
return;
|
|
238
|
+
this._baselineShift = value;
|
|
239
|
+
this._propertyChanged.notify(this, "baselineShift");
|
|
240
|
+
}
|
|
241
|
+
get overprintText() { return this._overprintText; }
|
|
242
|
+
set overprintText(value) {
|
|
243
|
+
if (value == this._overprintText)
|
|
244
|
+
return;
|
|
245
|
+
this._overprintText = value;
|
|
246
|
+
this._propertyChanged.notify(this, "overprintText");
|
|
247
|
+
}
|
|
248
|
+
getUpdatedText(text) {
|
|
249
|
+
let updatedText = text;
|
|
357
250
|
if (this.placeholders.length > 0)
|
|
358
251
|
updatedText = this._replaceInStringPlaceholders();
|
|
359
252
|
return updatedText;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
Object.defineProperty(BaseTextItem.prototype, "colorPalette", {
|
|
369
|
-
get: function () {
|
|
370
|
-
return this._colorPalette;
|
|
371
|
-
},
|
|
372
|
-
enumerable: true,
|
|
373
|
-
configurable: true
|
|
374
|
-
});
|
|
375
|
-
BaseTextItem.prototype._canSetIsVariable = function () {
|
|
253
|
+
}
|
|
254
|
+
get placeholders() {
|
|
255
|
+
return this._placeholders;
|
|
256
|
+
}
|
|
257
|
+
get colorPalette() {
|
|
258
|
+
return this._colorPalette;
|
|
259
|
+
}
|
|
260
|
+
_canSetIsVariable() {
|
|
376
261
|
return true;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
set: function (value) {
|
|
393
|
-
this.leading = value / this.previewScale;
|
|
394
|
-
},
|
|
395
|
-
enumerable: true,
|
|
396
|
-
configurable: true
|
|
397
|
-
});
|
|
398
|
-
BaseTextItem.prototype.applyPermissionsConstrain = function () {
|
|
399
|
-
_super.prototype.applyPermissionsConstrain.call(this);
|
|
262
|
+
}
|
|
263
|
+
get previewFontSize() {
|
|
264
|
+
return this.font.size * this.previewScale;
|
|
265
|
+
}
|
|
266
|
+
set previewFontSize(value) {
|
|
267
|
+
this.font.size = value / this.previewScale;
|
|
268
|
+
}
|
|
269
|
+
get previewLeading() {
|
|
270
|
+
return this.leading * this.previewScale;
|
|
271
|
+
}
|
|
272
|
+
set previewLeading(value) {
|
|
273
|
+
this.leading = value / this.previewScale;
|
|
274
|
+
}
|
|
275
|
+
applyPermissionsConstrain() {
|
|
276
|
+
super.applyPermissionsConstrain();
|
|
400
277
|
this.itemPermissions.itemToolbarPermissions.showSelectButton = false;
|
|
401
278
|
if (this.textPermissions != null && !this.textPermissions.allowChangeText)
|
|
402
279
|
this.itemPermissions.itemToolbarPermissions.showEditButtonConstraint = false;
|
|
@@ -407,109 +284,99 @@ var BaseTextItem = /** @class */ (function (_super) {
|
|
|
407
284
|
this.textPermissions.allowChangeFontColor = false;
|
|
408
285
|
this.textPermissions.allowChangeShadow = false;
|
|
409
286
|
this.textPermissions.allowChangeStroke = false;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
}
|
|
428
|
-
|
|
429
|
-
get: function () { return this._violationSettings; },
|
|
430
|
-
set: function (value) {
|
|
431
|
-
this._setViolationSettings(value);
|
|
432
|
-
},
|
|
433
|
-
enumerable: true,
|
|
434
|
-
configurable: true
|
|
435
|
-
});
|
|
436
|
-
BaseTextItem.prototype._setViolationSettings = function (value, skipTypeCheck) {
|
|
437
|
-
if (skipTypeCheck === void 0) { skipTypeCheck = false; }
|
|
287
|
+
}
|
|
288
|
+
get textPermissions() { return this._textPermissions; }
|
|
289
|
+
set textPermissions(value) {
|
|
290
|
+
if (value == null)
|
|
291
|
+
throw new ArgumentException("textPermissions cannot be null");
|
|
292
|
+
if (equals(this._textPermissions, value))
|
|
293
|
+
return;
|
|
294
|
+
if (this._textPermissions != null)
|
|
295
|
+
this._textPermissions.propertyChanged.remove(this._onPermissionsChanged);
|
|
296
|
+
this._textPermissions = value;
|
|
297
|
+
this.applyPermissionsConstrain();
|
|
298
|
+
this._textPermissions.propertyChanged.add(this._onPermissionsChanged);
|
|
299
|
+
this._propertyChanged.notify(this, "textPermissions");
|
|
300
|
+
}
|
|
301
|
+
get violationSettings() { return this._violationSettings; }
|
|
302
|
+
set violationSettings(value) {
|
|
303
|
+
this._setViolationSettings(value);
|
|
304
|
+
}
|
|
305
|
+
_setViolationSettings(value, skipTypeCheck = false) {
|
|
438
306
|
if (!skipTypeCheck && !(value instanceof TextViolationSettings))
|
|
439
307
|
throw new ArgumentException("Shape ViolationSettings property must has TextViolationSettings type!");
|
|
440
|
-
|
|
441
|
-
}
|
|
442
|
-
|
|
308
|
+
super._setViolationSettings(value, skipTypeCheck);
|
|
309
|
+
}
|
|
310
|
+
_subscribeFontPropertyChanged() {
|
|
443
311
|
if (this._font != null)
|
|
444
312
|
this._font.addPropertyChanged(this._onFontPropertyChanged);
|
|
445
|
-
}
|
|
446
|
-
|
|
313
|
+
}
|
|
314
|
+
_unsubscribeFontPropertyChanged() {
|
|
447
315
|
if (this._font != null)
|
|
448
316
|
this._font.removePropertyChanged(this._onFontPropertyChanged);
|
|
449
|
-
}
|
|
450
|
-
|
|
317
|
+
}
|
|
318
|
+
_subscribeShadowPropertyChanged() {
|
|
451
319
|
if (this._shadow != null)
|
|
452
320
|
this._shadow.addPropertyChanged(this._onShadowPropertyChanged);
|
|
453
|
-
}
|
|
454
|
-
|
|
321
|
+
}
|
|
322
|
+
_unsubscribeShadowPropertyChanged() {
|
|
455
323
|
if (this._shadow != null)
|
|
456
324
|
this._shadow.removePropertyChanged(this._onShadowPropertyChanged);
|
|
457
|
-
}
|
|
458
|
-
|
|
325
|
+
}
|
|
326
|
+
_subscribeStrokePropertyChanged() {
|
|
459
327
|
if (this._stroke != null)
|
|
460
328
|
this._stroke.addPropertyChanged(this._onStrokePropertyChanged);
|
|
461
|
-
}
|
|
462
|
-
|
|
329
|
+
}
|
|
330
|
+
_unsubscribeStrokePropertyChanged() {
|
|
463
331
|
if (this._stroke != null)
|
|
464
332
|
this._stroke.removePropertyChanged(this._onStrokePropertyChanged);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
var simplified =
|
|
333
|
+
}
|
|
334
|
+
getSimplifiedObject(omitProperties) {
|
|
335
|
+
var simplified = super.getSimplifiedObject(["_placeholders", "currentTextImage", "textPermissions", "textForTextWhizz", "shadow", "stroke"].concat(omitProperties));
|
|
468
336
|
simplified["placeholders"] = this.placeholders.toArray();
|
|
469
337
|
simplified["textPermissions"] = this.textPermissions.getSimplifiedObject();
|
|
470
338
|
simplified["font"] = this.font.getSimplifiedObject();
|
|
471
339
|
simplified["shadow"] = this.shadow != null ? this.shadow.getSimplifiedObject() : null;
|
|
472
340
|
simplified["stroke"] = this.stroke != null ? this.stroke.getSimplifiedObject() : null;
|
|
473
341
|
return simplified;
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
return
|
|
342
|
+
}
|
|
343
|
+
_replaceInStringPlaceholders() {
|
|
344
|
+
return isValidXml(this.originalText)
|
|
477
345
|
? this._replaceInStringPlaceholdersValueInRichText()
|
|
478
346
|
: this._replaceInStringPlaceholdersValueInPlainText();
|
|
479
|
-
}
|
|
480
|
-
|
|
347
|
+
}
|
|
348
|
+
_replaceInStringPlaceholdersValueInPlainText() {
|
|
481
349
|
var value = this.originalText;
|
|
482
|
-
this.placeholders.forEach(
|
|
350
|
+
this.placeholders.forEach((p) => {
|
|
483
351
|
value = value.replace(p.id, p.value === "" ? p.name : p.value);
|
|
484
352
|
});
|
|
485
353
|
return value;
|
|
486
|
-
}
|
|
487
|
-
|
|
354
|
+
}
|
|
355
|
+
_replaceInStringPlaceholdersValueInRichText() {
|
|
488
356
|
if (this._originalTextDom == null) {
|
|
489
|
-
|
|
490
|
-
this._originalTextDom = domParser.parseFromString(
|
|
357
|
+
const domParser = new DOMParser();
|
|
358
|
+
this._originalTextDom = domParser.parseFromString(`<xml>${this.originalText}</xml>`, "text/xml");
|
|
491
359
|
}
|
|
492
|
-
|
|
360
|
+
const xmlDom = this._originalTextDom.cloneNode(true);
|
|
493
361
|
var spans = xmlDom.getElementsByTagName("span");
|
|
494
|
-
this.placeholders.forEach(
|
|
362
|
+
this.placeholders.forEach((p) => {
|
|
495
363
|
if (spans != null && spans.length) {
|
|
496
|
-
for (
|
|
497
|
-
|
|
364
|
+
for (let i = 0; i < spans.length; i++) {
|
|
365
|
+
const span = spans[i];
|
|
498
366
|
if (span.textContent != null) {
|
|
499
367
|
span.textContent = span.textContent.replace(p.id, p.value === "" ? p.name : p.value);
|
|
500
368
|
}
|
|
501
369
|
}
|
|
502
370
|
}
|
|
503
371
|
});
|
|
504
|
-
|
|
505
|
-
|
|
372
|
+
const serializer = new XMLSerializer();
|
|
373
|
+
const str = serializer.serializeToString(xmlDom);
|
|
506
374
|
return str.substr(0, str.length - 6).substr(5); // without <xml> and </xml>
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
_super.prototype._copy.call(this, source, destination, generateNewIds, appropriateParentContainer);
|
|
375
|
+
}
|
|
376
|
+
_copy(source, destination, generateNewIds, appropriateParentContainer) {
|
|
377
|
+
super._copy(source, destination, generateNewIds, appropriateParentContainer);
|
|
511
378
|
destination.textPermissions = source._textPermissions.clone();
|
|
512
|
-
destination.placeholders.setRange(source.placeholders.toArray().map(
|
|
379
|
+
destination.placeholders.setRange(source.placeholders.toArray().map(p => p.clone()));
|
|
513
380
|
destination.color = source._color.clone();
|
|
514
381
|
destination.text = source._text;
|
|
515
382
|
destination.font = source._font.clone();
|
|
@@ -528,217 +395,178 @@ var BaseTextItem = /** @class */ (function (_super) {
|
|
|
528
395
|
destination.isTextPlaceholder = source.isTextPlaceholder;
|
|
529
396
|
destination.maxLineLength = source.maxLineLength;
|
|
530
397
|
destination.overlapLinesEnabled = source.overlapLinesEnabled;
|
|
531
|
-
destination.colorPalette.setRange(source.colorPalette.toArray().map(
|
|
398
|
+
destination.colorPalette.setRange(source.colorPalette.toArray().map(c => c.clone()));
|
|
532
399
|
destination.baselineShift = source.baselineShift;
|
|
533
400
|
destination.overprintText = source.overprintText;
|
|
534
401
|
destination.listStyles = source.listStyles;
|
|
535
402
|
destination.characterLimit = source.characterLimit;
|
|
536
403
|
if (source.values != null) {
|
|
537
404
|
destination.values = [];
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
var i = _c.value;
|
|
541
|
-
destination.values.push(i.clone());
|
|
542
|
-
}
|
|
543
|
-
}
|
|
544
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
545
|
-
finally {
|
|
546
|
-
try {
|
|
547
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
548
|
-
}
|
|
549
|
-
finally { if (e_1) throw e_1.error; }
|
|
405
|
+
for (var i of source.values) {
|
|
406
|
+
destination.values.push(i.clone());
|
|
550
407
|
}
|
|
551
408
|
}
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
409
|
+
}
|
|
410
|
+
equals(other) {
|
|
411
|
+
const superEq = super.equals(other);
|
|
412
|
+
const textPermissionsEq = equals(this._textPermissions, other._textPermissions);
|
|
413
|
+
const placeholdersEq = arraysIsEqual(this._placeholders.toArray(), other._placeholders.toArray(), equals);
|
|
414
|
+
const colorEq = equals(this._color, other._color);
|
|
415
|
+
const textEq = equals(this._text, other._text);
|
|
416
|
+
const fontEq = equals(this._font, other._font);
|
|
417
|
+
const underlineEq = equals(this._underline, other._underline);
|
|
418
|
+
const originalTextEq = equals(this._originalText, other._originalText);
|
|
419
|
+
const leadingEq = equals(this._leading, other._leading);
|
|
420
|
+
const trackingEq = equals(this._tracking, other._tracking);
|
|
421
|
+
const alignmentEq = equals(this._alignment, other._alignment);
|
|
422
|
+
const checkTextCropEq = equals(this._checkTextCrop, other._checkTextCrop);
|
|
423
|
+
const verticalScaleEq = equals(this._verticalScale, other._verticalScale);
|
|
424
|
+
const previewScaleEq = equals(this._previewScale, other._previewScale);
|
|
425
|
+
const maxLineCountEq = equals(this._maxLineCount, other._maxLineCount);
|
|
426
|
+
const isTextPlaceholderEq = equals(this.isTextPlaceholder, other.isTextPlaceholder);
|
|
427
|
+
const maxLineLengthEq = equals(this._maxLineLength, other._maxLineLength);
|
|
428
|
+
const overlapLinesEnabledEq = equals(this._overlapLinesEnabled, other._overlapLinesEnabled);
|
|
429
|
+
const strokeEq = equals(this._stroke, other._stroke);
|
|
430
|
+
const valuesEq = arraysIsEqual(this.values, other.values, equals);
|
|
431
|
+
const colorPaletteEq = arraysIsEqual(this._colorPalette.toArray(), other._colorPalette.toArray(), equals);
|
|
432
|
+
const baselineShiftEq = equals(this._baselineShift, other._baselineShift);
|
|
433
|
+
const overprintTextEq = equals(this._overprintText, other._overprintText);
|
|
434
|
+
const listStylesEq = equals(this.listStyles, other.listStyles);
|
|
435
|
+
const characterLimitEq = equals(this.characterLimit, other.characterLimit);
|
|
579
436
|
return superEq && textPermissionsEq && placeholdersEq && colorEq && textEq && fontEq && underlineEq && originalTextEq && leadingEq
|
|
580
437
|
&& trackingEq && alignmentEq && checkTextCropEq && verticalScaleEq && previewScaleEq && maxLineCountEq && isTextPlaceholderEq
|
|
581
438
|
&& maxLineLengthEq && overlapLinesEnabledEq && strokeEq && valuesEq && colorPaletteEq && baselineShiftEq && overprintTextEq
|
|
582
439
|
&& listStylesEq && characterLimitEq;
|
|
583
|
-
}
|
|
584
|
-
|
|
440
|
+
}
|
|
441
|
+
isEmptyText() {
|
|
585
442
|
return this.text === "";
|
|
586
|
-
}
|
|
587
|
-
|
|
443
|
+
}
|
|
444
|
+
isEmptyXmlText() {
|
|
588
445
|
return this.text === "<p></p>" || this.text === "<p><span></span></p>";
|
|
589
|
-
}
|
|
590
|
-
|
|
446
|
+
}
|
|
447
|
+
isEmpty() {
|
|
591
448
|
return !this.isTextPlaceholder && (this.isEmptyText() || this.isEmptyXmlText());
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
}(RectangleItem));
|
|
630
|
-
export { BaseTextItem };
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
BaseTextItem.type = "baseText";
|
|
452
|
+
__decorate([
|
|
453
|
+
Property({ factory: new SimplePropertyFactory(50), displayName: "Character Limit" }),
|
|
454
|
+
__metadata("design:type", Number),
|
|
455
|
+
__metadata("design:paramtypes", [Number])
|
|
456
|
+
], BaseTextItem.prototype, "characterLimit", null);
|
|
457
|
+
__decorate([
|
|
458
|
+
Property({ factory: new SimplePropertyFactory(1), displayName: "Max line count" }),
|
|
459
|
+
__metadata("design:type", Number),
|
|
460
|
+
__metadata("design:paramtypes", [Number])
|
|
461
|
+
], BaseTextItem.prototype, "maxLineCount", null);
|
|
462
|
+
__decorate([
|
|
463
|
+
Property({ factory: new SimplePropertyFactory(50), displayName: "Max line length" }),
|
|
464
|
+
__metadata("design:type", Number),
|
|
465
|
+
__metadata("design:paramtypes", [Number])
|
|
466
|
+
], BaseTextItem.prototype, "maxLineLength", null);
|
|
467
|
+
__decorate([
|
|
468
|
+
Property({ factory: new ObjectPropertyFactory(StrokeSettings), displayName: "Stroke" }),
|
|
469
|
+
__metadata("design:type", StrokeSettings),
|
|
470
|
+
__metadata("design:paramtypes", [StrokeSettings])
|
|
471
|
+
], BaseTextItem.prototype, "stroke", null);
|
|
472
|
+
__decorate([
|
|
473
|
+
Property({ factory: new ObjectPropertyFactory(ShadowSettings), displayName: "Shadow" }),
|
|
474
|
+
__metadata("design:type", ShadowSettings),
|
|
475
|
+
__metadata("design:paramtypes", [ShadowSettings])
|
|
476
|
+
], BaseTextItem.prototype, "shadow", null);
|
|
477
|
+
__decorate([
|
|
478
|
+
Property({ enumObject: TextAlignment }),
|
|
479
|
+
__metadata("design:type", Number),
|
|
480
|
+
__metadata("design:paramtypes", [Number])
|
|
481
|
+
], BaseTextItem.prototype, "alignment", null);
|
|
482
|
+
__decorate([
|
|
483
|
+
Property({ type: "string" }),
|
|
484
|
+
__metadata("design:type", String)
|
|
485
|
+
], BaseTextItem.prototype, "listStyles", void 0);
|
|
631
486
|
(function (BaseTextItem) {
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
_this._postScriptName = postScriptName;
|
|
643
|
-
_this._size = size;
|
|
644
|
-
return _this;
|
|
487
|
+
class FontSettings extends ModelComponent {
|
|
488
|
+
constructor(postScriptName, size = 10) {
|
|
489
|
+
super();
|
|
490
|
+
this._fauxBold = false;
|
|
491
|
+
this._fauxItalic = false;
|
|
492
|
+
this._allCaps = false;
|
|
493
|
+
this._openTypeFeatures = [];
|
|
494
|
+
this.$_propertyChanged = new EventWithSenderArg();
|
|
495
|
+
this._postScriptName = postScriptName;
|
|
496
|
+
this._size = size;
|
|
645
497
|
}
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
return
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
});
|
|
698
|
-
Object.defineProperty(FontSettings.prototype, "postScriptName", {
|
|
699
|
-
get: function () { return this._postScriptName; },
|
|
700
|
-
set: function (value) {
|
|
701
|
-
if (this._postScriptName === value)
|
|
702
|
-
return;
|
|
703
|
-
this._postScriptName = value;
|
|
704
|
-
this.$_propertyChanged.notify(this, "postScriptName");
|
|
705
|
-
},
|
|
706
|
-
enumerable: true,
|
|
707
|
-
configurable: true
|
|
708
|
-
});
|
|
709
|
-
Object.defineProperty(FontSettings.prototype, "size", {
|
|
710
|
-
get: function () { return this._size; },
|
|
711
|
-
set: function (value) {
|
|
712
|
-
if (Math.EqualsOfFloatNumbers(this._size, value))
|
|
713
|
-
return;
|
|
714
|
-
this._size = value;
|
|
715
|
-
this.$_propertyChanged.notify(this, "size");
|
|
716
|
-
},
|
|
717
|
-
enumerable: true,
|
|
718
|
-
configurable: true
|
|
719
|
-
});
|
|
720
|
-
FontSettings.prototype.addPropertyChanged = function (listener) {
|
|
498
|
+
clone() {
|
|
499
|
+
const cloneSettings = new FontSettings(this._postScriptName, this._size);
|
|
500
|
+
cloneSettings._openTypeFeatures = structuredClone(this._openTypeFeatures);
|
|
501
|
+
cloneSettings.allCaps = this._allCaps;
|
|
502
|
+
cloneSettings.fauxItalic = this._fauxItalic;
|
|
503
|
+
cloneSettings.fauxBold = this._fauxBold;
|
|
504
|
+
return cloneSettings;
|
|
505
|
+
}
|
|
506
|
+
get fauxBold() { return this._fauxBold; }
|
|
507
|
+
set fauxBold(value) {
|
|
508
|
+
if (this._fauxBold === value)
|
|
509
|
+
return;
|
|
510
|
+
this._fauxBold = value;
|
|
511
|
+
this.$_propertyChanged.notify(this, "fauxBold");
|
|
512
|
+
}
|
|
513
|
+
get fauxItalic() { return this._fauxItalic; }
|
|
514
|
+
set fauxItalic(value) {
|
|
515
|
+
if (this._fauxItalic === value)
|
|
516
|
+
return;
|
|
517
|
+
this._fauxItalic = value;
|
|
518
|
+
this.$_propertyChanged.notify(this, "fauxItalic");
|
|
519
|
+
}
|
|
520
|
+
get allCaps() { return this._allCaps; }
|
|
521
|
+
set allCaps(value) {
|
|
522
|
+
if (this._allCaps === value)
|
|
523
|
+
return;
|
|
524
|
+
this._allCaps = value;
|
|
525
|
+
this.$_propertyChanged.notify(this, "allCaps");
|
|
526
|
+
}
|
|
527
|
+
get openTypeFeatures() { return this._openTypeFeatures; }
|
|
528
|
+
set openTypeFeatures(value) {
|
|
529
|
+
if (this._openTypeFeatures === value)
|
|
530
|
+
return;
|
|
531
|
+
this._openTypeFeatures = value;
|
|
532
|
+
this.$_propertyChanged.notify(this, "openTypeFeatures");
|
|
533
|
+
}
|
|
534
|
+
get postScriptName() { return this._postScriptName; }
|
|
535
|
+
set postScriptName(value) {
|
|
536
|
+
if (this._postScriptName === value)
|
|
537
|
+
return;
|
|
538
|
+
this._postScriptName = value;
|
|
539
|
+
this.$_propertyChanged.notify(this, "postScriptName");
|
|
540
|
+
}
|
|
541
|
+
get size() { return this._size; }
|
|
542
|
+
set size(value) {
|
|
543
|
+
if (EqualsOfFloatNumbers(this._size, value))
|
|
544
|
+
return;
|
|
545
|
+
this._size = value;
|
|
546
|
+
this.$_propertyChanged.notify(this, "size");
|
|
547
|
+
}
|
|
548
|
+
addPropertyChanged(listener) {
|
|
721
549
|
this.$_propertyChanged.add(listener);
|
|
722
|
-
}
|
|
723
|
-
|
|
550
|
+
}
|
|
551
|
+
removePropertyChanged(listener) {
|
|
724
552
|
this.$_propertyChanged.remove(listener);
|
|
725
|
-
}
|
|
726
|
-
|
|
553
|
+
}
|
|
554
|
+
static equals(a, b) {
|
|
727
555
|
if (a == null && b == null)
|
|
728
556
|
return true;
|
|
729
557
|
if (a == null || b == null)
|
|
730
558
|
return false;
|
|
731
559
|
return a.equals(b);
|
|
732
|
-
}
|
|
733
|
-
|
|
560
|
+
}
|
|
561
|
+
equals(other) {
|
|
734
562
|
return this.postScriptName === other.postScriptName &&
|
|
735
563
|
this.size === other.size &&
|
|
736
564
|
this.fauxBold === other.fauxBold &&
|
|
737
565
|
this.fauxItalic === other.fauxItalic &&
|
|
738
566
|
this.allCaps === other.allCaps &&
|
|
739
|
-
|
|
740
|
-
}
|
|
741
|
-
|
|
567
|
+
isEqual(this.openTypeFeatures, other.openTypeFeatures);
|
|
568
|
+
}
|
|
569
|
+
getSimplifiedObject() {
|
|
742
570
|
return {
|
|
743
571
|
"allCaps": this.allCaps,
|
|
744
572
|
"fauxBold": this.fauxBold,
|
|
@@ -747,23 +575,21 @@ export { BaseTextItem };
|
|
|
747
575
|
"postScriptName": this.postScriptName,
|
|
748
576
|
"size": this.size
|
|
749
577
|
};
|
|
750
|
-
}
|
|
751
|
-
|
|
752
|
-
}(ModelComponent));
|
|
578
|
+
}
|
|
579
|
+
}
|
|
753
580
|
BaseTextItem.FontSettings = FontSettings;
|
|
754
|
-
|
|
755
|
-
|
|
581
|
+
class BaseTextValue {
|
|
582
|
+
constructor(name, text) {
|
|
756
583
|
this.name = name;
|
|
757
584
|
this.text = text;
|
|
758
585
|
}
|
|
759
|
-
|
|
586
|
+
equals(other) {
|
|
760
587
|
return other != null &&
|
|
761
588
|
equals(this.name, other.name) &&
|
|
762
589
|
equals(this.text, other.text);
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
}());
|
|
590
|
+
}
|
|
591
|
+
clone() { return new BaseTextValue(this.name, this.text); }
|
|
592
|
+
}
|
|
767
593
|
BaseTextItem.BaseTextValue = BaseTextValue;
|
|
768
594
|
})(BaseTextItem || (BaseTextItem = {}));
|
|
769
595
|
//# sourceMappingURL=BaseTextItem.js.map
|