From df4d4f88f547c7431a084a89d3d3ebe9f7f7b7d2 Mon Sep 17 00:00:00 2001 From: Patrick <patrick.wuerstle@gmx.de> Date: Thu, 26 Nov 2020 15:04:38 +0100 Subject: [PATCH] test ipad stuff --- vcm/templates/custom.js | 6 +++--- vcm/templates/story/virtualcitystory.js | 9 ++++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/vcm/templates/custom.js b/vcm/templates/custom.js index 5e3e448cc..ea89c5b2f 100644 --- a/vcm/templates/custom.js +++ b/vcm/templates/custom.js @@ -5,9 +5,9 @@ // // document.body.style.msTransform = scale; // IE 9 // // document.body.style.transform = scale; // General $("#tour-button").hide(); -console.log("checkagent: " + checkagent() + " istouchdevice: " + is_touch_device() + " isipad:" + checkIpad()); -document.getElementById("redtext").innerHTML = "checkagent: " + checkagent() + " istouchdevice: " + is_touch_device() + " isipad:" + checkIpad(); -checkagent(); +// console.log("checkagent: " + checkagent() + " istouchdevice: " + is_touch_device() + " isipad:" + checkIpad()); +// document.getElementById("redtext").innerHTML = "checkagent: " + checkagent() + " istouchdevice: " + is_touch_device() + " isipad:" + checkIpad(); +// checkagent(); // removebuildings(); diff --git a/vcm/templates/story/virtualcitystory.js b/vcm/templates/story/virtualcitystory.js index 2c72f3ab7..6a23d5e70 100644 --- a/vcm/templates/story/virtualcitystory.js +++ b/vcm/templates/story/virtualcitystory.js @@ -132,10 +132,13 @@ vcs.vcm.Framework.getInstance().subscribe("MAP_LOADED", function() { }); var framework = vcs.vcm.Framework.getInstance(); -if (checkagent() == true && framework.isMobile() == false){ - vcs.vcm.Framework.loadConfig("config_safari.json") -} else if (checkagent() == true && is_touch_device() == true) { +if (checkagent() == true && is_touch_device() == true && checkIpad() == true){ vcs.vcm.Framework.loadConfig("config_mobile.json") + var drop = document.getElementById("dropdownMain") + drop.classList.add('can-touch') + drop.style.display = "none"; // add "can-touch" class to document root using classList API +} else if (checkagent() == true && framework.isMobile() == false) { + vcs.vcm.Framework.loadConfig("config_safari.json") } else{ framework.isMobile() ? vcs.vcm.Framework.loadConfig("config_mobile.json") : vcs.vcm.Framework.loadConfig("config.json") } -- GitLab