260719_9
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import type * as Flatten from '@flatten-js/core';
|
||||
import {Box, type Point, type Segment} from '@flatten-js/core';
|
||||
import {mapLimit} from 'blend-promise-utils';
|
||||
import {compact, maxBy} from 'es-toolkit';
|
||||
import {minBy} from 'es-toolkit/compat';
|
||||
import type {Shape, SnapPoint} from '../App.types';
|
||||
import type {DrawController} from '../drawControllers/DrawController';
|
||||
import {getActiveLayerId, isEntityHighlighted, isEntitySelected} from '../state.ts';
|
||||
import {ArcEntity, type ArcJsonData} from './ArcEntity.ts';
|
||||
import {type Entity, EntityName, type JsonEntity} from './Entity';
|
||||
import {LineEntity, type LineJsonData} from './LineEntity.ts';
|
||||
import { Box, type Point, type Segment } from '@flatten-js/core';
|
||||
import { mapLimit } from 'blend-promise-utils';
|
||||
import { compact, maxBy } from 'es-toolkit';
|
||||
import { minBy } from 'es-toolkit/compat';
|
||||
import type { Shape, SnapPoint } from '../App.types';
|
||||
import type { DrawController } from '../drawControllers/DrawController';
|
||||
import { getActiveLayerId, isEntityHighlighted, isEntitySelected } from '../state.ts';
|
||||
import { ArcEntity, type ArcJsonData } from './ArcEntity.ts';
|
||||
import { type Entity, EntityName, type JsonEntity } from './Entity';
|
||||
import { LineEntity, type LineJsonData } from './LineEntity.ts';
|
||||
|
||||
export class PolyLineEntity implements Entity {
|
||||
public id: string = crypto.randomUUID();
|
||||
@@ -133,6 +133,7 @@ export class PolyLineEntity implements Entity {
|
||||
type: EntityName.PolyLine,
|
||||
lineColor: this.lineColor,
|
||||
lineWidth: this.lineWidth,
|
||||
lineDash: this.lineDash,
|
||||
layerId: this.layerId,
|
||||
shapeData: null,
|
||||
children: compact(await mapLimit(this.entities, 20, (entity) => entity.toJson())),
|
||||
@@ -178,6 +179,7 @@ export class PolyLineEntity implements Entity {
|
||||
polyLineEntity.id = jsonEntity.id;
|
||||
polyLineEntity.lineColor = jsonEntity.lineColor;
|
||||
polyLineEntity.lineWidth = jsonEntity.lineWidth;
|
||||
polyLineEntity.lineDash = jsonEntity.lineDash;
|
||||
return polyLineEntity;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user