Commit 33075d8a authored by Patrick's avatar Patrick
Browse files

test more ipad stuff

parent e22af9e2
...@@ -28,7 +28,9 @@ checkagent = function(){ ...@@ -28,7 +28,9 @@ checkagent = function(){
} }
checkIpad = function(){ checkIpad = function(){
let ipad = false;
if (navigator.userAgent.match(/Mac/) && navigator.maxTouchPoints && navigator.maxTouchPoints > 2) { if (navigator.userAgent.match(/Mac/) && navigator.maxTouchPoints && navigator.maxTouchPoints > 2) {
alert("ipad") ipad = true;
} }
return ipad
} }
\ No newline at end of file
...@@ -9,7 +9,7 @@ $("#tour-button").hide(); ...@@ -9,7 +9,7 @@ $("#tour-button").hide();
// removebuildings(); // removebuildings();
// document.getElementById("SLayerChange").checked = true; // document.getElementById("SLayerChange").checked = true;
checkIpad();
}; };
......
...@@ -134,6 +134,8 @@ vcs.vcm.Framework.getInstance().subscribe("MAP_LOADED", function() { ...@@ -134,6 +134,8 @@ vcs.vcm.Framework.getInstance().subscribe("MAP_LOADED", function() {
var framework = vcs.vcm.Framework.getInstance(); var framework = vcs.vcm.Framework.getInstance();
if (checkagent() == true && framework.isMobile() == false){ if (checkagent() == true && framework.isMobile() == false){
vcs.vcm.Framework.loadConfig("config_safari.json") vcs.vcm.Framework.loadConfig("config_safari.json")
} else if (checkIpad() == true) {
vcs.vcm.Framework.loadConfig("config_mobile.json")
} else{ } else{
framework.isMobile() ? vcs.vcm.Framework.loadConfig("config_mobile.json") : vcs.vcm.Framework.loadConfig("config.json") framework.isMobile() ? vcs.vcm.Framework.loadConfig("config_mobile.json") : vcs.vcm.Framework.loadConfig("config.json")
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment