Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with custom columns #18

Open
celia-ms opened this issue Oct 14, 2020 · 0 comments
Open

Problem with custom columns #18

celia-ms opened this issue Oct 14, 2020 · 0 comments

Comments

@celia-ms
Copy link

celia-ms commented Oct 14, 2020

Hi,

I have a problem. I try to create a 100 x 100 grid

.scss
.grid-stack>.grid-stack-item { $gridstack-columns: 100; @for $i from 1 through $gridstack-columns { &[data-gs-width='#{$i}'] { width: (100% / $gridstack-columns) * $i; } &[data-gs-x='#{$i}'] { left: (100% / $gridstack-columns) * $i; } &[data-gs-min-width='#{$i}'] { min-width: (100% / $gridstack-columns) * $i; } &[data-gs-max-width='#{$i}'] { max-width: (100% / $gridstack-columns) * $i; } } }

.html

<div lb-gridstack [options]="gridoptions" height="100" width="100">
<div *ngFor="let layer of gridLayers" lb-gridstack-item [x]="layer.x" [y]="layer.y" [auto-position]="layer.autoPosition" [width]="layer.width" [height]="layer.height">

this.gridoptions = {width: 100, animate: 'true', placeholderClass: 'grid-stack-placeholder', verticalMargin:1, float:'true',cellHeight :5};

The problem is that when I move the item the grid-stack-placeholde does not have the correct position.

image

I can't be doing wrong or if any property is not correct.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant