grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

BUG: The UI for Margin and Padding properties inside the sector

Open jayeshmotwani opened this issue 6 years ago • 3 comments

Hello,

I am creating a sector for just margin and padding with the code below:

{
	name: 'Layout Settings',
	open: false,
	buildProps: ['margin', 'padding'],
	properties: [
		{
			property: 'margin',
			properties: [
				{name: 'Top', property: 'margin-top'},
				{name: 'Bottom', property: 'margin-bottom'},
				{name: 'Left', property: 'margin-left'},
				{name: 'Right', property: 'margin-right'}
			],
		},
		{
			property: 'padding',
			properties: [
				{name: 'Top', property: 'padding-top'},
				{name: 'Bottom', property: 'padding-bottom'},
				{name: 'Left', property: 'padding-left'},
				{name: 'Right', property: 'padding-right'}
			],
		}
	]
}

And the sector is created with Margin Properties as shown in below screenshot:

Grapes js margin placement

As you could see, the properties are placed in the same row. I want them to be displayed as 2 properties only in a row. Please refer the below screenshot for more information:

Grapes js width and height placement

Thanks for your help.

jayeshmotwani avatar Aug 17 '20 07:08 jayeshmotwani

Hi @jayeshmotwani, wich version are you using? I've just copy/paste your code and it seems working as you expect like in your second image, not the first. I've also did it in the demo, works fine, the properties are organized with 2 prop in the same row. See below: image

RJCAM avatar Aug 17 '20 11:08 RJCAM

Hello @RJCAM,

Thanks for your reply. I am using version 0.16.18

jayeshmotwani avatar Aug 17 '20 11:08 jayeshmotwani

Ahhh! I just realized! It is because I increased the size of the panel!

jayeshmotwani avatar Aug 17 '20 12:08 jayeshmotwani