Code Monkey home page Code Monkey logo

Comments (5)

amirnissim avatar amirnissim commented on April 28, 2024

This is a tricky one.

The problem is that the $watch here is not fired when widgets are added.
This is easily solved by adding a true flag as the third parameter here. (why?).

However, the tricky part is that gridster does not support dynamic content. Once you run it on a certain element, you cannot run it again (when the data is updated). There is a destroy method, but unfortunately it completely clears the element's content.

Options:

  1. hack gridster
  2. try out gridster fork with support for leaving the DOM intact when calling destroy
  3. migrate to an angular supporting package like angular-gridster

I don't like any of the above. So far I have tried 1 and 3 without any luck :/

Advice is welcome.

from redash.

arikfr avatar arikfr commented on April 28, 2024

#4: Instead of creating a new gridster object (calling $.gridster), let's reuse the existing one. And when changing the elements make sure they're added/removed using the API.

WDYT?

from redash.

amirnissim avatar amirnissim commented on April 28, 2024

Tried that as well. didn't work.
Maybe I'll try it again...

from redash.

arikfr avatar arikfr commented on April 28, 2024

I think that if you see that it still doesn't work, let's leave it be for now and fry the bigger fish.

from redash.

amirnissim avatar amirnissim commented on April 28, 2024

bring it on! (read: assign me)

from redash.

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.