Add storing of vertical alignment property for column blocks
[MAILPOET-2609]
This commit is contained in:
committed by
Pavel Dohnal
parent
1c6cffc44d
commit
7cccd68d08
@ -95,6 +95,7 @@ const mapBlocks = (blocks, customFields = [], parent = null) => {
|
||||
position: (index + 1).toString(),
|
||||
type: 'column',
|
||||
params: {
|
||||
vertical_alignment: block.attributes.verticalAlignment || null,
|
||||
width: block.attributes.width
|
||||
? block.attributes.width : Math.round(100 / parent.innerBlocks.length),
|
||||
},
|
||||
|
@ -69,6 +69,9 @@ const mapColumnBlocks = (data, customFields = []) => {
|
||||
if (has(data.params, 'width')) {
|
||||
mapped.attributes.width = parseFloat(data.params.width);
|
||||
}
|
||||
if (has(data.params, 'vertical_alignment')) {
|
||||
mapped.attributes.verticalAlignment = data.params.vertical_alignment;
|
||||
}
|
||||
return mapped;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user