Coder Social home page Coder Social logo

Comments (2)

amanosacrous avatar amanosacrous commented on May 26, 2024 1

Hi @Rubiniuz,

It seems that the problem is related to how the grid has been declared.

I tested the posted code, and the functions for adding and deleting items work perfectly.

On the other hand, in the declaration of the layout, it's curious how the x and y indices are assigned. You declare the headers with hours and weekdays, and for the weekdays, you assign 2 Y spaces. However, when you declare all the other layout items, you start at the position x+1 (correct) and y+1 (incorrect), because you've already used 2 spaces. This causes the Y indices to be off by 1 from the correct ones. I tested it, and it seems to be the key issue.

I drew the grid with this fix, putting the correct indices, and the result is as follows:
image

As you can see, the real index for ID: 35 is (x: 5, y: 4) because the items in the first row take up 2 spaces. By changing y+1 to y+2 and correcting the left-side header indices in the layout generation, the problem of the inconsistent indices should be fixed.

If this solution does not fix the problem, please provide a StackBlitz reproduction of the bug, and we will investigate further.

from angular-grid-layout.

Rubiniuz avatar Rubiniuz commented on May 26, 2024 1

@amanosacrous I just tested it and this was the fix. such a small stupid thing I looked over. I updated it and everything is now perfect in my app. thanks for your help

from angular-grid-layout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.