Skip to content

Commit 988f330

Browse files
committed
修复选区因为包含自由折线组件导致尺寸、位置计算错误的问题
1 parent fbc1018 commit 988f330

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

src/modules/elements/utils/ElementUtils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ export default class ElementUtils {
324324
}
325325

326326
/**
327-
* 计算自由绘制非闭合线框区块
327+
* 计算自由折线非闭合线框区块
328328
*
329329
* @param coords
330330
* @param styles
@@ -348,7 +348,7 @@ export default class ElementUtils {
348348
}
349349

350350
/**
351-
* 计算自由绘制闭合线框区块
351+
* 计算自由折线闭合线框区块
352352
*
353353
* @param coords
354354
* @param styles
@@ -367,7 +367,7 @@ export default class ElementUtils {
367367
}
368368

369369
/**
370-
* 计算自由绘制线框区块
370+
* 计算自由折线线框区块
371371
*
372372
* @param coords
373373
* @param styles

src/modules/stage/StageSelection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ export default class StageSelection implements IStageSelection {
376376
Object.assign(this.rangeElement.model, ElementUtils.createEmptyGroupObject());
377377
} else {
378378
if (!this.rangeElement.isRotating && !this.rangeElement.isTransforming) {
379-
const coords = CommonUtils.getBoxByPoints(elements.map(element => element.rotateCoords).flat());
379+
const coords = CommonUtils.getBoxByPoints(elements.map(element => element.rotateBoxCoords).flat());
380380
Object.assign(this.rangeElement.model, {
381381
coords,
382382
boxCoords: LodashUtils.jsonClone(coords),

src/modules/stage/StageShield.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ export default class StageShield extends DrawerBase implements IStageShield, ISt
14921492
}
14931493

14941494
/**
1495-
* 处理自由绘制下的鼠标按下事件
1495+
* 处理自由折线下的鼠标按下事件
14961496
*/
14971497
private _handleArbitraryPressUp(): void {
14981498
const element = this.store.creatingArbitraryElement(this.cursor.worldValue, true);
@@ -1588,7 +1588,7 @@ export default class StageShield extends DrawerBase implements IStageShield, ISt
15881588
} else if (this.isHandActive) {
15891589
this._processHandCreatorMove(e);
15901590
}
1591-
// 非自由绘制模式,绘制完成之后重绘
1591+
// 非自由折线模式,绘制完成之后重绘
15921592
if (!this.isArbitraryDrawing) {
15931593
await this._tryCreatedRedraw();
15941594
}
@@ -1935,7 +1935,7 @@ export default class StageShield extends DrawerBase implements IStageShield, ISt
19351935
}
19361936

19371937
/**
1938-
* 更新自由绘制组件
1938+
* 更新自由折线组件
19391939
*
19401940
* @param e
19411941
* @returns
@@ -2523,7 +2523,7 @@ export default class StageShield extends DrawerBase implements IStageShield, ISt
25232523
}
25242524

25252525
/**
2526-
* 提交自由绘制
2526+
* 提交自由折线
25272527
*/
25282528
async commitArbitraryDrawing(): Promise<void> {
25292529
if (this.isArbitraryDrawing) {

src/modules/stage/StageStore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,7 +1726,7 @@ export default class StageStore implements IStageStore {
17261726
}
17271727

17281728
/**
1729-
* 创建一个自由绘制的组件
1729+
* 创建一个自由折线的组件
17301730
*
17311731
* @param coord
17321732
* @param tailAppend true表示追加节点,false表示更新尾部节点
@@ -1776,7 +1776,7 @@ export default class StageStore implements IStageStore {
17761776
}
17771777

17781778
/**
1779-
* 完成创建自由绘制组件
1779+
* 完成创建自由折线组件
17801780
*
17811781
* @param element
17821782
*/

src/stores/stage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ export const useStageStore = defineStore("stage", {
13541354
}
13551355
},
13561356
/**
1357-
* 提交自由绘制
1357+
* 提交自由折线
13581358
*/
13591359
commitArbitraryDrawing(): void {
13601360
shield.commitArbitraryDrawing();

src/types/Creator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export enum CreatorCategories {
3131
cursor = "cursor",
3232
// 形状
3333
shapes = "shapes",
34-
// 自由绘制
34+
// 自由折线
3535
freedom = "freedom",
3636
// 文本
3737
text = "text",

src/types/CreatorDicts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const CursorCreators: Creator[] = [MoveableCreator, HandCreator];
103103
// 形状工具
104104
export const ShapeCreators: Creator[] = [RectangleCreator, LineRectangleCreator, EllipseCreator, PolygonCreator, ImageCreator];
105105

106-
// 自由绘制工具
106+
// 自由折线工具
107107
export const FreedomCreators: Creator[] = [PenCreator, PencilCreator];
108108

109109
// 所有工具

0 commit comments

Comments
 (0)