Skip to contents

Builds renderer-neutral movement connector rows from source geometry and a dragmapr_state. Each row describes the line from a region's original anchor to its state-adjusted anchor.

Usage

region_connectors(
  x,
  state,
  region_col = NULL,
  threshold_m = 1,
  include_unmoved = FALSE,
  as_sf = FALSE
)

Arguments

x

An sf object, a dragmapr_layout, or a layout-like object with sf geometry.

state

A dragmapr_state.

region_col

Region column in x. Defaults to the binding metadata stored in state.

threshold_m

Minimum movement distance to mark a connector visible.

include_unmoved

Include zero-distance rows.

as_sf

Return an sf line layer instead of a plain data frame.

Value

A data frame or sf object.