mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 14:42:32 -05:00
fix multiple area fields draw
This commit is contained in:
1 parent
7d0f32e1f9
commit
a478112b07
2 files changed
+11
-2
No files matched your search
@@ -673,7 +673,16 @@ export default {
|
||||
}
|
||||
|
||||
this.drawField.areas ||= []
|
||||
this.drawField.areas.push(area)
|
||||
|
||||
const insertBeforeAreaIndex = this.drawField.areas.findIndex((a) => {
|
||||
return a.attachment_uuid === area.attachment_uuid && a.page > area.page
|
||||
})
|
||||
|
||||
if (insertBeforeAreaIndex !== -1) {
|
||||
this.drawField.areas.splice(insertBeforeAreaIndex, 0, area)
|
||||
} else {
|
||||
this.drawField.areas.push(area)
|
||||
}
|
||||
|
||||
if (this.template.fields.indexOf(this.drawField) === -1) {
|
||||
this.template.fields.push(this.drawField)
|
||||
|
||||
Reference in new issue
Block a user