|
|
|
@ -1210,6 +1210,21 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const lastField = this.selectedField || this.template.fields[this.template.fields.length - 1]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.template.preferences?.carry_forward_attributes && lastField?.preferences) {
|
|
|
|
|
|
|
|
field.preferences ||= {}
|
|
|
|
|
|
|
|
field.preferences = { ...field.preferences }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const attrsToCopy = ['font', 'font_size', 'font_type', 'align', 'valign', 'color']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
attrsToCopy.forEach((attr) => {
|
|
|
|
|
|
|
|
if (lastField.preferences[attr]) {
|
|
|
|
|
|
|
|
field.preferences[attr] = lastField.preferences[attr]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (field.type === 'strikethrough') {
|
|
|
|
if (field.type === 'strikethrough') {
|
|
|
|
field.readonly = true
|
|
|
|
field.readonly = true
|
|
|
|
field.default_value = true
|
|
|
|
field.default_value = true
|
|
|
|
@ -1254,6 +1269,21 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.drawField = field
|
|
|
|
this.drawField = field
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const lastField = this.selectedField || this.template.fields[this.template.fields.length - 1]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.template.preferences?.carry_forward_attributes && lastField?.preferences) {
|
|
|
|
|
|
|
|
field.preferences ||= {}
|
|
|
|
|
|
|
|
field.preferences = { ...field.preferences }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const attrsToCopy = ['font', 'font_size', 'font_type', 'align', 'valign', 'color']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
attrsToCopy.forEach((attr) => {
|
|
|
|
|
|
|
|
if (lastField.preferences[attr]) {
|
|
|
|
|
|
|
|
field.preferences[attr] = lastField.preferences[attr]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
this.drawOption = null
|
|
|
|
this.drawOption = null
|
|
|
|
|