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

TypeError: Cannot read properties of undefined (reading 'getBoundingClientRect') #59

Open
Yuliasik opened this issue Dec 2, 2022 · 0 comments
Labels
question Further information is requested

Comments

@Yuliasik
Copy link

Yuliasik commented Dec 2, 2022

Hello @e-oj, I really like your solution for the grid position
Unfortunately, a faced an issue with the implementation of your solution.

Could you please, support me with that?
Thanks in advance!

image

Here is my typescript code:

 this.taskService.getTasks().subscribe(
      response => {
        this.allTasks = response
        this.dates = Array.from(this.allTasks.keys()).sort();

        const magicGrid = new MagicGrid({
          container: '.tasks',
          items: 20,
          animate: true,
          gutter: 20,
          static: false
        });
        magicGrid.listen();
        magicGrid.positionItems();
      }
    )

My HTML code

<div class="tasks">
  <ng-container *ngIf="allTasks && allTasks.size > 0">
    <div *ngFor="let key of dates">
      {{key}}
    </div>
  </ng-container>
</div>
@yuguangl yuguangl added the question Further information is requested label Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants