Skip to content

Commit

Permalink
improve: floating image initial position #484
Browse files Browse the repository at this point in the history
  • Loading branch information
Hufe921 committed Mar 20, 2024
1 parent b6758a6 commit 9d2ee3a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/editor/core/position/Position.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ export class Position {
positionItem.metrics = prePosition.metrics
positionItem.coordinate = prePosition.coordinate
}
// 兼容浮动元素初始坐标为空的情况-默认使用左上坐标
if (!element.imgFloatPosition) {
element.imgFloatPosition = {
x,
y
}
}
this.floatPositionList.push({
pageNo,
element,
Expand Down

0 comments on commit 9d2ee3a

Please sign in to comment.