/*
 * app.js - the Zanimo animation editor
 */

(function (app, curtain, store, editor, runner) {

    var VERSION = 22;

    app.init = function () {

        curtain.init();
        store.setup(VERSION);
        runner.init();
        editor.init();

        curtain.animate().then(curtain.bind);
    };

    window.onerror = function (err) { alert(err); };
    window.document.addEventListener("DOMContentLoaded", app.init);

}(
    window.App = window.App || {},
    window.Curtain,
    window.Store,
    window.Editor,
    window.Runner
));

@@ -115,16 +115,1050 @@
  = 22;%0A%0A
+    // fix layout when no CSS calc() support available%0A    function fixCSSCalc() %7B%0A        var dummy = document.createElement(),%0A            calc = null;%0A%0A        %5B%22%22, %22-webkit-%22, %22-moz-%22, %22-ms-%22%5D.forEach(function (prefix) %7B%0A            var t = prefix + %22calc(10px)%22;%0A            dummy.style.cssText = %22width:%22 + t + %22;%22;%0A            if(dummy.style.width === t) calc = prefix + %22calc%22;%0A        %7D);%0A%0A        if (calc !== null) return;%0A%0A        var $doc = $(%22.documentation section.content%22),%0A            $content = $(%22.documentation section.content div.doc-content%22),%0A            $editor = $(%22.CodeMirror%22),%0A            fixLayout = function () %7B%0A                var h = window.innerHeight;%0A                $doc.style.height = (h - 30) + %22px%22;%0A                $content.style.height = (h - 65) + %22px%22;%0A                $editor.style.height = (h - 80) + %22px%22;%0A            %7D;%0A        if(!isTouchable) window.addEventListener(%22resize%22, fixLayout);%0A        window.addEventListener(%22orientationchange%22, fixLayout);%0A        fixLayout();%0A    %7D%0A%0A
     app.
@@ -1276,24 +1276,47 @@
 or.init();%0A%0A
+        fixCSSCalc();%0A%0A
         curt

fix layout when no CSS calc() available