Skip to content

window.chrome fails on Firefox #35

@jaydubal

Description

@jaydubal

While applying the value for this.povToPixel_ using window.chrome check, fails on Firefox.

/* Currently only Chrome is rendering panoramas in a 3D sphere. The other
 browsers are just showing the raw panorama tiles and pan them around.
 */

This scenario is no longer valid.

To fix it comment this line

// this.povToPixel_ = !!window.chrome ? PanoMarker.povToPixel3d : PanoMarker.povToPixel2d;

And add this code below it

this.povToPixel_ = PanoMarker.povToPixel2d;
var pixelCanvas = document.createElement("canvas");

  
if (pixelCanvas && (pixelCanvas.getContext("experimental-webgl") || pixelCanvas.getContext("webgl"))) 
{
   this.povToPixel_ = PanoMarker.povToPixel3d;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions