Commit 247c61a5 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Allow Touch inline examples height to vary.

parent 87532737
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ Ext.define('Docs.view.examples.Inline', {
        constrainTo: false
    },
    // Make too long examples scrollable
    maxHeight: 400,
    maxHeight: 890,

    dockedItems: [{
        xtype: 'toolbar',
@@ -97,7 +97,7 @@ Ext.define('Docs.view.examples.Inline', {
    // Syncs the height with number of lines in code example.
    updateHeight: function() {
        if (Docs.touchExamplesUi) {
            this.setHeight(320+50);
            this.setHeight(this.preview.getHeight());
        }
        else {
            var editorHeight = this.editor.getHeight();
+8 −0
Original line number Diff line number Diff line
@@ -62,6 +62,14 @@ Ext.define('Docs.view.examples.InlinePreview', {
            this.iframeId = "egIframe" + this.statics().iframeId;
        }
        return this.iframeId;
    },

    /**
     * Returns the current height of the preview.
     * @return {Number}
     */
    getHeight: function() {
        return document.getElementById(this.getIframeId()).parentNode.clientHeight;
    }

});