Error on resizing when map div is hidden.



  • 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



  • Txh will be fixed in new vwrsion


Log in to reply
 

Looks like your connection to Windy Community was lost, please wait while we try to reconnect.