Socket
Socket
Sign inDemoInstall

spherical-viewer

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.0 to 0.3.0

2

package.json
{
"name": "spherical-viewer",
"version": "0.2.0",
"version": "0.3.0",
"description": "panorama photo viewer",

@@ -5,0 +5,0 @@ "author": "Kazuhiko Arase",

@@ -553,2 +553,50 @@ //

var fakeFullscreen = function() {
var orgSize = null;
var fullscreened = false;
return function() {
fullscreened = !fullscreened;
if (!fullscreened) {
return;
}
orgSize = { width : cv.width, height : cv.height };
document.body.style.overflow = 'hidden';
cv.style.position = 'absolute';
cv.style.left = '0px';
cv.style.top = '0px';
var lastSize = { width : 0, height : 0 };
var watchWindow = function() {
if (!fullscreened) {
// exit fullscreen.
document.body.style.overflow = '';
cv.style.position = '';
cv.style.left = '';
cv.style.top = '';
cv.width = orgSize.width;
cv.height = orgSize.height;
return;
}
var size = { width : window.innerWidth, height : window.innerHeight };
var resized = lastSize.width != size.width ||
lastSize.height != size.height;
if (resized) {
cv.width = size.width;
cv.height = size.height;
lastSize = size;
}
window.setTimeout(watchWindow, 50);
};
watchWindow();
};
};
var fullscreenSupport = function() {

@@ -558,3 +606,3 @@

if (!names || !document[names.fullscreenEnabled]) {
return function() {};
return fakeFullscreen();
}

@@ -561,0 +609,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc