GrapesJS / blocks-basic

Basic blocks for the GrapesJS editor
BSD 3-Clause "New" or "Revised" License
75 stars 108 forks source link

Column2 both columns are not taking same width after placing components in both columns #14

Closed csreenivasulu closed 1 year ago

csreenivasulu commented 5 years ago

Hi Team,

I have 2 components, i am using column2 component to place those 2 components. Initially drag and drop column2 layout component then placing my components in to those columns one by one, when i drag and drop one component which occupies 70%(column width) of width in the row and another column taking 30% width. I found that issue is in the blocks.js file for layout column2 we haven't declare width as 50% so that it is not taking proper equal width. Tried to modified blocks.js file and i am not able to generate grapesjs-blocks-basic.min in dest folder. Tried to modified grapesjs-blocks-basic.min file directly and tested which is working fine. Can you please update the blocks.js file accordingly.

Below is the modified and working code for column2 in grapesjs-blocks-basic.min

h("column2")&&l.add("column2",{label:n.labelColumn2,attributes:{class:"gjs-fonts gjs-f-b2"},category:n.category,content:"<div "+w+">\n <div "+k+' style="'+(o?"flex-basis":"width")+': 50%;">

\n <div '+k+' style="'+(o?"flex-basis":"width")+': 50%;">
\n \n '+(r?"":"")}

Please do the need full.

Thanks, Sreenivasulu C column2_issue

artf commented 1 year ago

Closing this as any block can be easily updated