Commit 4fad6ce1 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fix regression on setting inline preview height.

Increase editorHeight by toolbar height after checking if editor gave us
height - otherwise the check will always succeed.  Fixes inline examples
height in ExtJS examples.
parent 55c35632
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -115,12 +115,12 @@ Ext.define('Docs.view.examples.Inline', {
    // Syncs the height with number of lines in code example.
    updateHeight: function() {
        var previewHeight = this.preview.getHeight();
        var editorHeight = this.editor.getHeight() + 30;
        var editorHeight = this.editor.getHeight();
        if (Docs.touchExamplesUi && previewHeight > 0) {
            this.setHeight(previewHeight);
        }
        else if (editorHeight > 0) {
            this.setHeight(Ext.Number.constrain(editorHeight, 0, this.maxCodeHeight));
            this.setHeight(Ext.Number.constrain(editorHeight+30, 0, this.maxCodeHeight));
        }
    }