Skip to content

Commit

Permalink
refactor: move types to separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
bsteinemann committed Jun 20, 2024
1 parent 10751cf commit 9e0034f
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 66 deletions.
2 changes: 1 addition & 1 deletion src/esri/types/labeling/CIMLabelClass.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
*/
Expand Down
67 changes: 2 additions & 65 deletions src/esri/types/labeling/CIMMaplexLabelPlacementProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
*/

import { CIMObject } from "../CIMObject";
import { CIMMaplexRotationProperties } from "./CIMMaplexRotationProperties";
import { CIMMaplexStrategyPriorities } from "./CIMMaplexStrategyPriorities";
import { LabelFeatureType } from "./LabelFeatureType";

/**
Expand Down Expand Up @@ -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;
}
42 changes: 42 additions & 0 deletions src/esri/types/labeling/CIMMaplexRotationProperties.ts
Original file line number Diff line number Diff line change
@@ -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;
};
28 changes: 28 additions & 0 deletions src/esri/types/labeling/CIMMaplexStrategyPriorities.ts
Original file line number Diff line number Diff line change
@@ -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;
};

0 comments on commit 9e0034f

Please sign in to comment.