Bug in the model switcher display ?


  • Paraglider

    I noticed a problem with the model switcher (bottom right of windy.com).
    It becomes invisible when my plugin is opened.

    alt text

    Steps to reproduce:

    1. go to windy.com - the model switcher is displayed
    2. Install windy-plugin-sounding,
    3. right click on the map and select "better sounding" - the switcher is pushed out of the screen to the right (no more visible)
    4. close the plugin, the switcher stays invisible

    alt text

    1. Open detailed forecasts (ie bottom bar) - the switcher re-appears
    2. now you can open/close the plugin, the switcher remains visible.

    It might well be a problem with my plugin. However

    • I haven't noticed it before (first noticed yesterday or 2 days ago),
    • I tried an older version of my plugin, still has the same bug,
    • As noted before, openning/closing detailed forecasts "fix" the problem.

    Thanks for your help


  • Administrator

    Strange will check. Is that hidden with CSS or it is removed from DOM?


  • Administrator

    @vicb said in Bug in the model switcher display ?:

    windy-plugin-sounding

    There is a BUG in plugin

    
    module.exports = {
      displayName: "Better Sounding",
      hook: "contextmenu",
      dependencies: [
        "https://cdn.jsdelivr.net/npm/d3@5/dist/d3.min.js",
        "https://cdn.jsdelivr.net/npm/preact@8/dist/preact.min.js",
      ],
    
    // REMOVE THIS
      className: "plugin-lhpane plugin-mobile-fullscreen", 
      exclusive: "lhpane",  
    };
    
    
    REMOVE THIS
    .onwindy-plugin-sounding {
    	.left-border {
            left: @width;
      }
    	#search {
    		display: none;
    	}
    }
    

  • Paraglider

    @ivo I can not remove the lines you pointed out because I want the plugin to be on the left hand side.

    The class are expected and what is used in the left pane example.

    I have investigated a little more and figure out that the problem come from the fact that I load the detail plugin (to get access to the "meteogram" dependency).

    
        const meteogram = W.require("plugins")
          .detail.load()
          .then(() => {
            W.define("sMeteogram", ["meteogram", "Class"], function(m, c) {
              return c.extend(m, {
                legend: () => this,
              });
            });
            return W.require("sMeteogram");
          });
    

    The detail plugin is probably exclusive for the bottom pane hence the issue.


  • Paraglider

    I ended up loading detail-render instead and it fixed my issue.

    Thanks !


Log in to reply
 

Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
NodeBB & contributors, OSM & contributors, HERE maps