From 9e0034f7c4493de5d01e56dceaed542ee9fa427a Mon Sep 17 00:00:00 2001 From: Balz Steinemann Date: Thu, 20 Jun 2024 14:14:22 +0200 Subject: [PATCH] refactor: move types to separate files --- src/esri/types/labeling/CIMLabelClass.ts | 2 +- .../CIMMaplexLabelPlacementProperties.ts | 67 +------------------ .../labeling/CIMMaplexRotationProperties.ts | 42 ++++++++++++ .../labeling/CIMMaplexStrategyPriorities.ts | 28 ++++++++ 4 files changed, 73 insertions(+), 66 deletions(-) create mode 100644 src/esri/types/labeling/CIMMaplexRotationProperties.ts create mode 100644 src/esri/types/labeling/CIMMaplexStrategyPriorities.ts diff --git a/src/esri/types/labeling/CIMLabelClass.ts b/src/esri/types/labeling/CIMLabelClass.ts index d2effc4..aa485c3 100644 --- a/src/esri/types/labeling/CIMLabelClass.ts +++ b/src/esri/types/labeling/CIMLabelClass.ts @@ -12,7 +12,7 @@ export enum LabelExpressionEngine { Arcade }; - /** +/** * Represents a label class which describes how to generate a set of text labels from a group of features in a feature layer. * */ diff --git a/src/esri/types/labeling/CIMMaplexLabelPlacementProperties.ts b/src/esri/types/labeling/CIMMaplexLabelPlacementProperties.ts index e510b03..91ab56c 100644 --- a/src/esri/types/labeling/CIMMaplexLabelPlacementProperties.ts +++ b/src/esri/types/labeling/CIMMaplexLabelPlacementProperties.ts @@ -6,6 +6,8 @@ */ import { CIMObject } from "../CIMObject"; +import { CIMMaplexRotationProperties } from "./CIMMaplexRotationProperties"; +import { CIMMaplexStrategyPriorities } from "./CIMMaplexStrategyPriorities"; import { LabelFeatureType } from "./LabelFeatureType"; /** @@ -701,68 +703,3 @@ export interface CIMMaplexInternalZonePriorities { */ center?: number; } -/** - * Represents Maplex rotation properties. - * - */ -export interface CIMMaplexRotationProperties { - /** - * Gets or sets a value indicating whether to enable rotation. - */ - enable?: boolean; - /** - * Gets or sets the rotation type. - */ - rotationType?: MaplexLabelRotationType; - /** - * Gets or sets the rotation field to get values from. - */ - rotationField?: null | string; - /** - * Gets or sets a value indicating whether to place the label perpendicular to the angle. - */ - perpendicularToAngle?: boolean; - /** - * Gets or sets a value indicating whether or not to align the label to the angle. - */ - alignLabelToAngle?: boolean; - /** - * Gets or sets the alignment type. - */ - alignmentType?: MaplexRotationAlignmentType; - /** - * Gets or sets additional angle to add to the data value. - */ - additionalAngle?: number; - /** - * Gets or sets ExpressionInfo that contains the Arcade expression that returns rotation as a number. - * When both RotationField and RotationExpressionInfo are present RotationExpressionInfo is used. - */ - rotationExpressionInfo?: null | CIMExpressionInfo; -} -/** - * Represents Maplex strategy priorities. - * - */ -export interface CIMMaplexStrategyPriorities { - /** - * Gets or sets the priority for stacking. - */ - stacking?: number; - /** - * Gets or sets the priority for overrun. - */ - overrun?: number; - /** - * Gets or sets the priority for font compression. - */ - fontCompression?: number; - /** - * Gets or sets the priority for font reduction. - */ - fontReduction?: number; - /** - * Gets or sets the priority for abbreviation. - */ - abbreviation?: number; -} diff --git a/src/esri/types/labeling/CIMMaplexRotationProperties.ts b/src/esri/types/labeling/CIMMaplexRotationProperties.ts new file mode 100644 index 0000000..ca1dae8 --- /dev/null +++ b/src/esri/types/labeling/CIMMaplexRotationProperties.ts @@ -0,0 +1,42 @@ +import { CIMObject } from "../CIMObject"; +import { MaplexLabelRotationType, MaplexRotationAlignmentType, CIMExpressionInfo } from "./CIMMaplexLabelPlacementProperties"; + +/** + * Represents Maplex rotation properties. + * + */ +export type CIMMaplexRotationProperties = CIMObject & { + /** + * Gets or sets a value indicating whether to enable rotation. + */ + enable?: boolean; + /** + * Gets or sets the rotation type. + */ + rotationType?: MaplexLabelRotationType; + /** + * Gets or sets the rotation field to get values from. + */ + rotationField?: null | string; + /** + * Gets or sets a value indicating whether to place the label perpendicular to the angle. + */ + perpendicularToAngle?: boolean; + /** + * Gets or sets a value indicating whether or not to align the label to the angle. + */ + alignLabelToAngle?: boolean; + /** + * Gets or sets the alignment type. + */ + alignmentType?: MaplexRotationAlignmentType; + /** + * Gets or sets additional angle to add to the data value. + */ + additionalAngle?: number; + /** + * Gets or sets ExpressionInfo that contains the Arcade expression that returns rotation as a number. + * When both RotationField and RotationExpressionInfo are present RotationExpressionInfo is used. + */ + rotationExpressionInfo?: null | CIMExpressionInfo; +}; diff --git a/src/esri/types/labeling/CIMMaplexStrategyPriorities.ts b/src/esri/types/labeling/CIMMaplexStrategyPriorities.ts new file mode 100644 index 0000000..e42540c --- /dev/null +++ b/src/esri/types/labeling/CIMMaplexStrategyPriorities.ts @@ -0,0 +1,28 @@ +import { CIMObject } from "../CIMObject"; + +/** + * Represents Maplex strategy priorities. + * + */ +export type CIMMaplexStrategyPriorities = CIMObject & { + /** + * Gets or sets the priority for stacking. + */ + stacking?: number; + /** + * Gets or sets the priority for overrun. + */ + overrun?: number; + /** + * Gets or sets the priority for font compression. + */ + fontCompression?: number; + /** + * Gets or sets the priority for font reduction. + */ + fontReduction?: number; + /** + * Gets or sets the priority for abbreviation. + */ + abbreviation?: number; +};