Skip to content

number values of continuousCloseProximity do not change behavior #1411

@jacksonjacobs1

Description

@jacksonjacobs1

Description

I am tweaking the behavior of a polygon annotation layer. First I tried setting finalPointProximity, to (a) an integer and (b) true. The UI behavior responded accordingly, with the polygon annotation completing when the mouse click occurred (a) within the click radius and (b) anywhere on the screen, respectively.

const annotationLayer = map.createLayer('annotation',
    {
        active: true,
        zIndex: 2,
        finalPointProximity: UI_SETTINGS.finalPointProximity,
        // continuousCloseProximity: UI_SETTINGS.continuousCloseProximity,
    });

I then tried the same for continuousCloseProximity:

const annotationLayer = map.createLayer('annotation',
    {
        active: true,
        zIndex: 2,
        // finalPointProximity: UI_SETTINGS.finalPointProximity,
        continuousCloseProximity: UI_SETTINGS.continuousCloseProximity,
    });

However, only the true value had an effect on UI behavior. The integer value did not alter the behavior of the annotationLayer, with the polygon annotation completing only within the default radius of 10 pixels.

This behavior does not seem to match the expected behavior of the continuousCloseProximity variable:

The minimum distance in display coordinates (pixels) to close a polygon or end drawing a line when dragging to create an annotation. false never closes at the end of a drag. true is effectively infinite.

Related links

This issue is related to #1106

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