lore-engine
Advanced tools
Comparing version 1.0.29 to 1.0.30
{ | ||
"name": "lore-engine", | ||
"version": "1.0.29", | ||
"version": "1.0.30", | ||
"description": "A WebGL based 3D data visualization engine.", | ||
@@ -5,0 +5,0 @@ "main": "./app.js", |
@@ -197,2 +197,6 @@ //@ts-check | ||
this.canvas.addEventListener(wheelevent, function (e) { | ||
if (that.isInIframe() && !e.ctrlKey) { | ||
return; | ||
} | ||
e.preventDefault(); | ||
@@ -421,4 +425,17 @@ | ||
} | ||
/** | ||
* Checks whether the script is being run in an IFrame. | ||
* | ||
* @returns {Boolean} Returns whether the script is run in an IFrame. | ||
*/ | ||
isInIframe() { | ||
try { | ||
return window.self !== window.top; | ||
} catch (e) { | ||
return true; | ||
} | ||
} | ||
} | ||
module.exports = ControlsBase; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42307011
20747