master117 / MagicMirror-FootballLeagues

A live viewer for recent soccer results and league tables. Outdated!
GNU General Public License v3.0
7 stars 5 forks source link

2 widgets configured separately display the same results #3

Closed prysme01 closed 6 years ago

prysme01 commented 6 years ago

Could you try this setup ?

    {
        module: 'MagicMirror-FootballLeagues',
        position: 'top_right',
        disabled:false,
        header: 'Football Adrien 1',
        config:  {
                leagues: [450],
                    showNames: true,
                    displayTime: 60 * 1000 * 1,
                    showTables: true,
                apiKey:'xxx',
        }
    },
    {
        module: 'MagicMirror-FootballLeagues',
        position: 'top_right',
        disabled:false,
        header: 'Football Adrien 2',
        config:  {
                leagues: [464],
                    showNames: true,
                    displayTime: 60 * 1000 * 1,
                    showTables: true,
                apiKey:'xxx',
        }
    },

On mine the 2 two displays the same league.

master117 commented 6 years ago

Is there a reason you don't use:

leagues: [450, 464],

which displays both alternating?

Anyway, will look into it shortly, may be related to how magic mirror modules work. I didn't think of anyone running it two times.

prysme01 commented 6 years ago

I was using leagues: [450, 464] , but I would like to change the configuration depending on the league I displayed.

I also encounter an graphical issue, when the widget is switching from fixture to league table the width of the whole vertical layout is changing and it is not very nice to see that change every time. Do you know a way to have fixed width between fixture and league table ?

master117 commented 6 years ago

https://i.imgur.com/T1KsO5K.png

I can confirm your issue, I will see if I can resolve this.

Do you know a way to have fixed width between fixture and league table ?

I will add a way to set a fixed width

prysme01 commented 6 years ago

Great, thank you for your work and your time !

master117 commented 6 years ago

I was able to find and fix the problem: https://i.imgur.com/OeZ6zT2.png

The problem was indeed in MagicMirror itself: https://i.imgur.com/EjMPOxw.png

Both instances of the module received the same data, I introduced unique ids to avoid this problem.

I will add a way to set a fixed width

Fixed widths have been added, currently both table and fixtures are now at 340px, this may become an option to set in the future.