Giter Site home page Giter Site logo

Comments (5)

juhamust avatar juhamust commented on May 22, 2024 1

Described behavior can be achieved with mozaik-ext-switch

from mozaik.

plouc avatar plouc commented on May 22, 2024

I've thought of a similar feature, (with a nice flipping effect, it could be nice), but while the second approach is feasible, the first one isn't because of the different requirements for each widgets, another option:

{
  type: 'widget.switcher',
  switchTime: 2000,
  widgets: [
    {
      type: 'weather.weather',
      //…
    },
    {
      type: 'time.clock',
      //…
    }
  ]
}

from mozaik.

juhamust avatar juhamust commented on May 22, 2024

Yes, a special widget type could be an option, too :) With my first example I thought that: "all the parameters are passed to both widgets, it does not matter whether they needed them or not".

But additional challenge with my proposal comes if parameter value happens to be an array. Thus, I prefer your proposal.

from mozaik.

juhamust avatar juhamust commented on May 22, 2024

With multiple widgets, this feature comes more and more wanted. Thus, here is my initial version for it: https://github.com/juhamust/mozaik-ext-switcher

However, it has some problem with data loading, as sometimes (most of the time) the data is not loaded properly. Care to share some consultancy, @plouc, what might be the issue ?

from mozaik.

juhamust avatar juhamust commented on May 22, 2024

Never mind, I figured out by myself: juhamust/mozaik-ext-switch@81e3a64#diff-3654cc213698058980abcf63f19994a0R40

from mozaik.

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.