Skip to content

Commit

Permalink
perf: 优化PPTX导入效果
Browse files Browse the repository at this point in the history
  • Loading branch information
pipipi-pikachu committed Jan 11, 2025
1 parent dbdab18 commit 53751c1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"number-precision": "^1.6.0",
"pinia": "^2.1.7",
"pptxgenjs": "^3.12.0",
"pptxtojson": "^1.1.0",
"pptxtojson": "^1.1.1",
"prosemirror-commands": "^1.6.0",
"prosemirror-dropcursor": "^1.8.1",
"prosemirror-gapcursor": "^1.3.2",
Expand Down
4 changes: 3 additions & 1 deletion src/hooks/useImport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ export default () => {
}

const parseElements = (elements: Element[]) => {
for (const el of elements) {
const sortedElements = elements.sort((a, b) => a.order - b.order)

for (const el of sortedElements) {
const originWidth = el.width || 1
const originHeight = el.height || 1
const originLeft = el.left
Expand Down

0 comments on commit 53751c1

Please sign in to comment.