JeremyHeleine / Photo-Sphere-Viewer

A JavaScript library to display Photo Sphere panoramas.
854 stars 952 forks source link

Camera position is not set while call setPanorama() #102

Open iyoskusm opened 4 years ago

iyoskusm commented 4 years ago

I supply _spherecorrection object to setPanorama(), but I don't get camera position changed. I try code like this:

}, d.prototype.setPanorama = function(t, e, i) {
        var e2 = e;
        if (null !== this.prop.loading_promise) throw new x("Loading already in progress");
        "boolean" == typeof e && (i = e, e = void 0), e || this.scene ? e || (e = {}) : e = {
            longitude: this.config.default_long,
            latitude: this.config.default_lat,
            zoom: this.config.default_zoom_lvl,
            sphere_correction: this.config.sphere_correction
        };

        if (e2 != void 0) {
            e.sphere_correction =  e2;
        }

It's work like a charm.

Any idea?