Skip to content

Commit

Permalink
Release 3.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Jan 19, 2019
1 parent 644f622 commit 5aa8174
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)

Copyright (c) 2015 Jérémy Heleine
Copyright (c) 2016-2018 Damien Sorel
Copyright (c) 2016-2019 Damien Sorel

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions dist/photo-sphere-viewer.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* Photo Sphere Viewer 3.5.0
* Photo Sphere Viewer 3.5.1
* Copyright (c) 2014-2015 Jérémy Heleine
* Copyright (c) 2015-2018 Damien "Mistic" Sorel
* Copyright (c) 2015-2019 Damien "Mistic" Sorel
* Licensed under MIT (https://opensource.org/licenses/MIT)
*/
.psv-container {
Expand Down
21 changes: 14 additions & 7 deletions dist/photo-sphere-viewer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*!
* Photo Sphere Viewer 3.5.0
* Photo Sphere Viewer 3.5.1
* Copyright (c) 2014-2015 Jérémy Heleine
* Copyright (c) 2015-2018 Damien "Mistic" Sorel
* Copyright (c) 2015-2019 Damien "Mistic" Sorel
* Licensed under MIT (https://opensource.org/licenses/MIT)
*/
(function(root, factory) {
Expand Down Expand Up @@ -2924,7 +2924,9 @@ PhotoSphereViewer.prototype.enterFullscreen = function() {
};

PhotoSphereViewer.prototype.exitFullscreen = function() {
PSVUtils.exitFullscreen();
if (this.isFullscreenEnabled()) {
PSVUtils.exitFullscreen();
}
};

/**
Expand Down Expand Up @@ -3181,9 +3183,9 @@ PhotoSphereViewer.prototype.cleanPosition = function(position) {
* @param {PhotoSphereViewer.SphereCorrection} sphere_correction - mutated
*/
PhotoSphereViewer.prototype.cleanSphereCorrection = function(sphere_correction) {
sphere_correction.pan = PSVUtils.parseAngle(sphere_correction.pan || 0, true);
sphere_correction.pan = PSVUtils.parseAngle(sphere_correction.pan || 0);
sphere_correction.tilt = PSVUtils.parseAngle(sphere_correction.tilt || 0, true);
sphere_correction.roll = PSVUtils.parseAngle(sphere_correction.roll || 0, true);
sphere_correction.roll = PSVUtils.parseAngle(sphere_correction.roll || 0, true, false);
};

/**
Expand Down Expand Up @@ -7533,10 +7535,15 @@ PSVUtils.parseSpeed = function(speed) {
* @summary Parses an angle value in radians or degrees and returns a normalized value in radians
* @param {string|number} angle - eg: 3.14, 3.14rad, 180deg
* @param {boolean} [zeroCenter=false] - normalize between -Pi/2 - Pi/2 instead of 0 - 2*Pi
* @param {boolean} [halfCircle=zeroCenter] - normalize between -Pi - Pi instead of -Pi/2 - Pi/2
* @returns {float}
* @throws {PSVError} when the angle cannot be parsed
*/
PSVUtils.parseAngle = function(angle, zeroCenter) {
PSVUtils.parseAngle = function(angle, zeroCenter, halfCircle) {
if (halfCircle === undefined) {
halfCircle = zeroCenter;
}

if (typeof angle === 'string') {
var match = angle.toLowerCase().trim().match(/^(-?[0-9]+(?:\.[0-9]*)?)(.*)$/);

Expand Down Expand Up @@ -7572,7 +7579,7 @@ PSVUtils.parseAngle = function(angle, zeroCenter) {
angle = PSVUtils.TwoPI + angle;
}

return zeroCenter ? PSVUtils.bound(angle - Math.PI, -PSVUtils.HalfPI, PSVUtils.HalfPI) : angle;
return zeroCenter ? PSVUtils.bound(angle - Math.PI, -Math.PI / (halfCircle ? 2 : 1), Math.PI / (halfCircle ? 2 : 1)) : angle;
};

/**
Expand Down
4 changes: 2 additions & 2 deletions dist/photo-sphere-viewer.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/photo-sphere-viewer.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "photo-sphere-viewer",
"version": "3.5.0",
"version": "3.5.1",
"authors": [
{
"name": "Jérémy Heleine",
Expand Down

0 comments on commit 5aa8174

Please sign in to comment.