DrawHole custom geometry function not working

41 Views Asked by At

DrawHole has an undocumented option to use a custom geometry function which is not working :

var geomFn = options.geometryFunction
if (geomFn) {
    options.geometryFunction = function (c, g) {
        g = _geometryFn(c, g)
        return geomFn(c, g)
    }
} else {
    ...
}

If it is changed to the code below it works :

var geomFn = options.geometryFunction
if (geomFn) {
    options.geometryFunction = function (c, g) {
        g = _geometryFn.bind(this)(c, g)
        return geomFn.bind(this)(c, g)
    }
} else {
    ...
}
0

There are 0 best solutions below