How to use the ve-range-utils/getRangeAngles function in ve-range-utils

To help you get started, we’ve selected a few ve-range-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github TeselaGen / openVectorEditor / app / CircularView.js View on Github external
);
                currentRadius += maxYOffset + 1 * totalAnnotationHeight;
            });
        }

        var innerRadius = baseRadius - annotationHeight / 2; //tnr: -annotationHeight/2 because features are drawn from the center

        if (selectionLayer.selected) {
            var {
                startAngle,
                endAngle,
                totalAngle
            } = getRangeAngles(selectionLayer, sequenceLength);
            var sector = Sector({
                center: [0, 0], //the center is always 0,0 for our annotations :) we rotate later!
                r: baseRadius - annotationHeight / 2,
                R: currentRadius,
                start: 0,
                end: totalAngle
            });
            annotationsSvgs.push(
github TeselaGen / openVectorEditor / app / CircularView.js View on Github external
circularViewData.features.forEach(function(annotation, index) {
                var {
                    startAngle,
                    endAngle,
                    totalAngle
                } = getRangeAngles(annotation, sequenceLength);
                if (annotation.yOffset > maxYOffset) {
                    maxYOffset = annotation.yOffset;
                }

                annotationsSvgs.push(
github TeselaGen / openVectorEditor / app / CircularView.js View on Github external
function Caret({
    caretPosition,
    sequenceLength,
    innerRadius,
    outerRadius
}) {
    var caretWidth = .01;
    var {
        startAngle,
        endAngle
    } = getRangeAngles({
        start: caretPosition,
        end: caretPosition
    }, sequenceLength);
    return (