MCPcopy Index your code
hub / github.com/apache/echarts / newLabelLayoutWithGeometry

Function newLabelLayoutWithGeometry

src/label/labelLayoutHelper.ts:283–294  ·  view source on GitHub ↗
(
    newBaseWithDefaults: Partial<LabelLayoutData>,
    source: LabelLayoutBase
)

Source from the content-addressed store, hash-verified

281 * Copy the only relevant properties to avoid the conflict or wrongly reuse of the props of `LabelLayoutWithGeometry`.
282 */
283export 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.

Callers 2

dealFunction · 0.90
layoutMethod · 0.90

Calls 1

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…