260719_9
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import type * as Flatten from '@flatten-js/core';
|
||||
import {type Box, Point, Polygon, Relations, type Segment, Vector} from '@flatten-js/core';
|
||||
import {type Shape, type SnapPoint, SnapPointType} from '../App.types';
|
||||
import type {DrawController} from '../drawControllers/DrawController';
|
||||
import {twoPointBoxToPolygon} from '../helpers/box-to-polygon';
|
||||
import {getExportColor} from '../helpers/get-export-color';
|
||||
import {mirrorPointOverAxis} from '../helpers/mirror-point-over-axis.ts';
|
||||
import {polygonToSegments} from '../helpers/polygon-to-segments';
|
||||
import {scalePoint} from '../helpers/scale-point';
|
||||
import {getActiveLayerId, isEntityHighlighted, isEntitySelected} from '../state.ts';
|
||||
import {type Entity, EntityName, type JsonEntity} from './Entity';
|
||||
import type {LineEntity} from './LineEntity.ts';
|
||||
import { type Box, Point, Polygon, Relations, type Segment, Vector } from '@flatten-js/core';
|
||||
import { type Shape, type SnapPoint, SnapPointType } from '../App.types';
|
||||
import type { DrawController } from '../drawControllers/DrawController';
|
||||
import { twoPointBoxToPolygon } from '../helpers/box-to-polygon';
|
||||
import { getExportColor } from '../helpers/get-export-color';
|
||||
import { mirrorPointOverAxis } from '../helpers/mirror-point-over-axis.ts';
|
||||
import { polygonToSegments } from '../helpers/polygon-to-segments';
|
||||
import { scalePoint } from '../helpers/scale-point';
|
||||
import { getActiveLayerId, isEntityHighlighted, isEntitySelected } from '../state.ts';
|
||||
import { type Entity, EntityName, type JsonEntity } from './Entity';
|
||||
import type { LineEntity } from './LineEntity.ts';
|
||||
|
||||
export class RectangleEntity implements Entity {
|
||||
public id: string = crypto.randomUUID();
|
||||
@@ -176,6 +176,7 @@ export class RectangleEntity implements Entity {
|
||||
type: EntityName.Rectangle,
|
||||
lineColor: this.lineColor,
|
||||
lineWidth: this.lineWidth,
|
||||
lineDash: this.lineDash,
|
||||
layerId: this.layerId,
|
||||
shapeData: {
|
||||
points: this.polygon.vertices.map((vertex) => ({
|
||||
@@ -202,6 +203,7 @@ export class RectangleEntity implements Entity {
|
||||
rectangleEntity.id = jsonEntity.id;
|
||||
rectangleEntity.lineColor = jsonEntity.lineColor;
|
||||
rectangleEntity.lineWidth = jsonEntity.lineWidth;
|
||||
rectangleEntity.lineDash = jsonEntity.lineDash;
|
||||
return rectangleEntity;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user