(
newBaseWithDefaults: Partial<LabelLayoutData>,
source: LabelLayoutBase
)
| 281 | * Copy the only relevant properties to avoid the conflict or wrongly reuse of the props of `LabelLayoutWithGeometry`. |
| 282 | */ |
| 283 | export function newLabelLayoutWithGeometry( |
| 284 | newBaseWithDefaults: Partial<LabelLayoutData>, |
| 285 | source: LabelLayoutBase |
| 286 | ): LabelLayoutWithGeometry { |
| 287 | for (let i = 0; i < LABEL_LAYOUT_BASE_PROPS.length; i++) { |
| 288 | const prop = LABEL_LAYOUT_BASE_PROPS[i]; |
| 289 | if (newBaseWithDefaults[prop] == null) { |
| 290 | (newBaseWithDefaults[prop] as any) = source[prop]; |
| 291 | } |
| 292 | } |
| 293 | return ensureLabelLayoutWithGeometry(newBaseWithDefaults as LabelLayoutData); |
| 294 | } |
| 295 | |
| 296 | /** |
| 297 | * Create obb if no one, can cache it. |
no test coverage detected
searching dependent graphs…