Windy Community
    • Unread
    • Categories
    • Groups
    • Go to windy.com
    • Register
    • Login

    Error on resizing when map div is hidden.

    Scheduled Pinned Locked Moved Your Feedback and Suggestions
    2 Posts 2 Posters 1.7k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Thiago NovaesT Offline
      Thiago Novaes
      last edited by Thiago Novaes

      OS: OS X, Windows
      Browser: All

      If you try to resize the map, while windytv div is hidden you will get an error:

      Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0.

      alt text

      This line is the reason of the error:

      var ha = p[B].getImageData(0, 0, N, M)

      The Problem:

      N = width is 0

      The solution :

      Replace the line N = J.width with N = J.width || 1

      If N is equal 0 than use 1 as width, it will stop throwing the error.

      alt text

      1 Reply Last reply Reply Quote 0
      • ivoI Offline
        ivo Windy Staff
        last edited by

        Txh will be fixed in new vwrsion

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Windy Community  |  Powered by excellent NodeBB
        Terms of Use     Privacy Policy     Windy.com