@webspatial/core-sdk 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/iife/index.global.js +3 -3
- package/dist/iife/index.global.js.map +1 -1
- package/dist/index.js +14 -18
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/scene-polyfill.test.ts +60 -0
- package/src/scene-polyfill.ts +15 -17
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
(function(){
|
|
3
3
|
if(typeof window === 'undefined') return;
|
|
4
4
|
if(!window.__webspatialsdk__) window.__webspatialsdk__ = {}
|
|
5
|
-
window.__webspatialsdk__['core-sdk-version'] = "1.6.
|
|
5
|
+
window.__webspatialsdk__['core-sdk-version'] = "1.6.1"
|
|
6
6
|
})()
|
|
7
7
|
|
|
8
8
|
var __defProp = Object.defineProperty;
|
|
@@ -1999,15 +1999,14 @@ function hijackWindowOpen(window2) {
|
|
|
1999
1999
|
function hijackWindowATag(openedWindow) {
|
|
2000
2000
|
openedWindow.document.onclick = function(e) {
|
|
2001
2001
|
let element = e.target;
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
if (handleATag(e)) {
|
|
2002
|
+
while (element) {
|
|
2003
|
+
if (element.tagName == "A") {
|
|
2004
|
+
if (handleATag(e, element)) {
|
|
2006
2005
|
return false;
|
|
2007
2006
|
}
|
|
2008
2007
|
return true;
|
|
2009
2008
|
}
|
|
2010
|
-
if (element
|
|
2009
|
+
if (element.parentElement) {
|
|
2011
2010
|
element = element.parentElement;
|
|
2012
2011
|
} else {
|
|
2013
2012
|
break;
|
|
@@ -2015,17 +2014,14 @@ function hijackWindowATag(openedWindow) {
|
|
|
2015
2014
|
}
|
|
2016
2015
|
};
|
|
2017
2016
|
}
|
|
2018
|
-
function handleATag(event) {
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
window.open(url, target);
|
|
2027
|
-
return true;
|
|
2028
|
-
}
|
|
2017
|
+
function handleATag(event, link) {
|
|
2018
|
+
if (event.defaultPrevented) return false;
|
|
2019
|
+
const target = link.target;
|
|
2020
|
+
const url = link.href;
|
|
2021
|
+
if (target && target !== "_self") {
|
|
2022
|
+
event.preventDefault();
|
|
2023
|
+
window.open(url, target);
|
|
2024
|
+
return true;
|
|
2029
2025
|
}
|
|
2030
2026
|
}
|
|
2031
2027
|
function getSceneDefaultConfig(sceneType) {
|
|
@@ -3217,7 +3213,7 @@ var Spatial = class {
|
|
|
3217
3213
|
* @returns Client SDK version string in format "x.x.x"
|
|
3218
3214
|
*/
|
|
3219
3215
|
getClientVersion() {
|
|
3220
|
-
return "1.6.
|
|
3216
|
+
return "1.6.1";
|
|
3221
3217
|
}
|
|
3222
3218
|
};
|
|
3223
3219
|
|