Allow others (widget) preview to render pixel width

This commit is contained in:
Rostislav Wolny
2020-05-20 16:34:23 +02:00
committed by Veljko V
parent e0545c48a3
commit 481508724c

View File

@@ -39,6 +39,11 @@ jQuery(($) => {
formElement.css('width', `${width.value}${unit}`);
} else {
previewForm.css('width', `${width.value}${unit}`);
if (unit === 'px') { // Update others container width to render full pixel size
$('#mailpoet_widget_preview #sidebar').css('width', `${width.value}${unit}`);
} else { // Reset container size to default render percent size
$('#mailpoet_widget_preview #sidebar').css('width', null);
}
}
// Ajdust others (widget) container