view service/shuttlepro/gui.js @ 1079:3d0133cdce90

smooth output fading support Ignore-this: 69d396a6c2ea8f693e270525e29d5b5d darcs-hash:2410a3cfe14d8c1d2e9103540cfaa429c55ca490
author drewp <drewp@bigasterisk.com>
date Thu, 14 Apr 2016 01:52:09 -0700
parents 9bb3eac740f0
children
line wrap: on
line source

(function () {
    function abbreviateTrig(trig) {
        // prefixes, abbreviations, make everything into links, etc
        return trig;
    }
    
    var model = {
        current: ko.observable("...")
    };
    model.refreshGraph = function() {
        $.ajax({
            url: "graph",
            success: function(data) {
                model.current(abbreviateTrig(data));
            }
        });
    };
    model.refreshGraph();
    ko.applyBindings(model);   
})();