view src/DML/MainVisBundle/Resources/assets/lib/vega/vega.expr.centroid.js @ 1:f38015048f48 tip

Added GPL
author Daniel Wolff
date Sat, 13 Feb 2016 20:43:38 +0100
parents 493bcb69166c
children
line wrap: on
line source
/**
 * centroid function in vega expression
 */
if (vg && false) { // see https://github.com/vega/vega/issues/385

    vg.parse.expr.codegen.functions["myFunction"] = function(args) {
        var a = args.map(vg.parse.expr.codegen);
        return 'window.myFunction('+a[0]+')';
    }
} else {
    //console.error("Can't register centroid function in vega expression");
}