Loading template/app/view/examples/TouchContainer.js +12 −9 Original line number Diff line number Diff line Loading @@ -81,15 +81,18 @@ Ext.define('Docs.view.examples.TouchContainer', { // Scale down the example when in tablet mode updateScale: function() { if (this.device.getDevice() === "tablet") { var iframe = Ext.query('iframe', this.el.dom)[0]; iframe.onload = function() { var style = document.createElement("style"); var styleContent = "html { overflow: hidden }"; // Scale to 70% of original. Default font-size is 114% style.innerHTML = "body { font-size: 79.8% !important; } html { overflow: hidden };"; if (this.device.getDevice() === "tablet") { styleContent += "body { font-size: 79.8% !important; }"; } style.innerHTML = styleContent; iframe.contentWindow.document.body.appendChild(style); }; } }, updateTitle: function() { Loading template/touchIframe.html +12 −8 Original line number Diff line number Diff line Loading @@ -9,6 +9,10 @@ <style id="iframe-css" type="text/css"></style> <style type="text/css" media="screen"> html { overflow: hidden } .home { text-align: center; } Loading Loading @@ -67,7 +71,7 @@ } if (options.tablet) { // Scale example down to 70% size. Default font-size is 114% Ext.get('iframe-css').update("body {font-size: 79.8% !important} html {overflow: hidden}"); Ext.get('iframe-css').update("body {font-size: 79.8% !important}"); } eval(code); } catch (e) { Loading Loading
template/app/view/examples/TouchContainer.js +12 −9 Original line number Diff line number Diff line Loading @@ -81,15 +81,18 @@ Ext.define('Docs.view.examples.TouchContainer', { // Scale down the example when in tablet mode updateScale: function() { if (this.device.getDevice() === "tablet") { var iframe = Ext.query('iframe', this.el.dom)[0]; iframe.onload = function() { var style = document.createElement("style"); var styleContent = "html { overflow: hidden }"; // Scale to 70% of original. Default font-size is 114% style.innerHTML = "body { font-size: 79.8% !important; } html { overflow: hidden };"; if (this.device.getDevice() === "tablet") { styleContent += "body { font-size: 79.8% !important; }"; } style.innerHTML = styleContent; iframe.contentWindow.document.body.appendChild(style); }; } }, updateTitle: function() { Loading
template/touchIframe.html +12 −8 Original line number Diff line number Diff line Loading @@ -9,6 +9,10 @@ <style id="iframe-css" type="text/css"></style> <style type="text/css" media="screen"> html { overflow: hidden } .home { text-align: center; } Loading Loading @@ -67,7 +71,7 @@ } if (options.tablet) { // Scale example down to 70% size. Default font-size is 114% Ext.get('iframe-css').update("body {font-size: 79.8% !important} html {overflow: hidden}"); Ext.get('iframe-css').update("body {font-size: 79.8% !important}"); } eval(code); } catch (e) { Loading