Smart Component 15

Tee adjustments.

Tee adjustments privately matches mapped tee pixels to the scorecard and selects an origin tee. Scorecard mode subtracts listed per-hole yardages. Yardage mode measures every tee to the same unbuffered fairway-arc midpoint (250 yards, then 230 or 270) and uses green center on Par 3s. It returns only final marker pixels, colors, signed differences, and display labels.

type: "tee-adjustments"component: caddie-tee-adjustmentsProtected placement

Usage

Add the tee adjustments to a graphic.

Include the component in the initial mount call, reconcile it through view.setSmartComponents, or append it with view.addSmartComponent. Types may repeat. Give repeated instances stable id values to style, show, hide, move, reset, or remove one instance independently. The selected Smart Component type, instance ID, render receipt, and protected selection options such as yardages, grid spacing, coverage, measured origin, buffer distance, detail, limits, or targets are sent to the overlay service. Marker-image origins, images, presentation styles, supported labels, and movement remain local.

const view = await caddie.mount(container, graphicRequest, [{
  type: "tee-adjustments",
  from: "Green",
  measurement: "yardage",
  selection: {
    minimumAdjustmentYards: -60,
    maximumAdjustmentYards: 60,
    minimumSeparationYards: 10,
  },
  labels: { direction: "right", originText: "T", adjustmentFormat: "signed" },
  style: {
    strokeColor: "#5A7A5CCC",
    alternateStrokeColor: "#FFFFFFF5",
    comparisonMarkerSize: 18,
    comparisonMarkerFillColor: "#202020",
    comparisonMarkerOutlineColor: "#FFFFFF",
    comparisonMarkerOutlineWidth: 5,
    labelLetterSpacing: 0.65,
  },
}]);

Defaults

Built-in presentation.

OriginFurthest tee
MeasurementScorecard
Range-60 through +60 yards
Separation10 yards
DirectionRight

Component options

Configure behavior and presentation.

OptionTypeDefaultDescription
type"tee-adjustments"RequiredRequests tee comparisons for a Hole graphic.
idstringAutomaticOptional stable 1–64 character instance ID using letters, numbers, underscores, or hyphens. Use IDs to independently control repeated Smart Components of the same type.
fromstring | nullnullCase-insensitive tee id, name, or color. Null, omitted, and unmatched values fall back to the furthest tee.
measurement"scorecard" | "yardage""scorecard"Scorecard subtracts listed hole yardages. Yardage compares direct distances to one shared fairway target; Par 3s use green center.
selection.minimumAdjustmentYardsnumber-60Inclusive lower signed-yardage bound.
selection.maximumAdjustmentYardsnumber60Inclusive upper signed-yardage bound.
selection.minimumSeparationYardsnumber10Suppresses a candidate closer than this to a previously retained adjustment, with nearest-to-origin priority. Configured marker and label dimensions also prevent visual overlap.
labels.direction"right" | "left""right"Sticky edge for every leader and label.
labels.originTextstring | null"T"Reference prefix for comparison labels; null and omitted values use T.
labels.adjustmentFormat"absolute" | "signed""signed"Signed renders T -85y or T +85y; absolute renders T 85y. The selected tee has no leader or edge label.
style.markerSizenumber18Marker diameter from 8 through 128 image pixels.
style.comparisonMarkerSizenumbermarkerSizeDiameter for every non-origin comparison marker, from 4 through 128 image pixels.
style.comparisonMarkerFillColorGraphicColormarkerFillColor / tee colorOptional fill override for non-origin comparison markers; null or omission preserves the fallback.
style.comparisonMarkerOutlineColorGraphicColormarkerOutlineColorOptional outline-color override for non-origin comparison markers.
style.comparisonMarkerOutlineWidthnumbermarkerOutlineWidthOptional outline-width override for non-origin comparison markers, from 0 through 12 image pixels.
style.strokeColorGraphicColor"#5A7A5C"Primary dash color; supports #RRGGBBAA and rgba(...).
style.alternateStrokeColorGraphicColor"#FFFFFF"Continuous under-stroke shown in the primary dash gaps; supports #RRGGBBAA and rgba(...).
style.strokeWidthnumber2Dashed leader width from 0.5 through 16 image pixels.
style.labelSizenumber16Positive whole-number sticky signed-label size in image pixels with no upper limit.
style.labelLetterSpacingnumber0.65Character tracking shared by label layout measurement and final SVG text.
style.labelFontWeightnumber500Numeric CSS label weight from 100 through 900.
style.labelOutlineColorGraphicColor"#FFFFFF"Contrast stroke behind each sticky label.
style.labelOutlineWidthnumber4Label contrast-stroke width from 0 through 16 image pixels.

Behavior

Important implementation details.

  • The origin is always retained as a standalone T marker with no leader or edge label, even when zero falls outside a caller-supplied range.
  • Alternatives are considered nearest to the origin first. Candidates inside the minimum yardage separation, with overlapping configured marker circles, or with colliding configured label heights are suppressed.
  • Tee-adjustment leaders deliberately use a continuous alternate-color contrast under-stroke plus a primary dashed stroke. Both colors accept #RRGGBBAA and rgba(...) values.
  • The response excludes tee identities, names, source coordinates, scorecard rows, course geometry, and transforms.
Protected course dataComponent responses contain only artifact-bound image pixels and safe presentation values. They do not include longitude, latitude, course geometry, affine transforms, control points, or the internal render sidecar.