Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/gridstack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1854,6 +1854,10 @@ export class GridStack {
this.opts.marginLeft = data.height;
delete this.opts.margin;
}

//without this.opts.margin, getMargin method will return undefined, and affect resize behavior
if(!this.opts.margin) this.opts.margin = Math.round((this.opts.marginTop + this.opts.marginBottom) / 2);
Copy link
Member

@adumesny adumesny Nov 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't the right fix because margin=0 is a valid value. Thanks for bringing this issue up, will fix it the proper way next...


this.opts.marginUnit = data.unit; // in case side were spelled out, use those units instead...
return this;
}
Expand Down