Skip to content

[FIX] getCoordsWithinElement in navcubeplugin not working with page scroll. #199

@siem4

Description

@siem4

Recently(last month) the scrolling of page offset and getting coords within the viewer was changed but this was forgotten in the navcubeplugin. Therefore the navcube did not change and therefore does not respond well to scrolling and selecting within the navcube. Would it be possible to change to as per the other changes:

        function getCoordsWithinElement(event) {
            var coords = [0, 0];
            if (!event) {
                event = window.event;
                coords[0] = event.x;
                coords[1] = event.y;
            } else {
                var element = event.target;
                const rect = element.getBoundingClientRect();

                coords[0] = event.clientX - rect.left;
                coords[1] = event.clientY - rect.top;
            }
            return coords;
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions