GeoShapeOptions
Table of contents
Extends ShapeOptionsWithDisplayValues<TLGeoShape, GeoShapeUtilDisplayValues>.
interface GeoShapeOptions extends ShapeOptionsWithDisplayValues<
TLGeoShape,
GeoShapeUtilDisplayValues
> {}Properties
customGeoTypes
optional
A map of custom geo type definitions. Each key becomes a new value for that can be used in the style panel and on shapes. Custom geo types inherit all standard geo shape behavior (labels, resizing, styling, etc.).
customGeoTypes?: Record<string, GeoTypeDefinition>;Example
const MyGeoShapeUtil = GeoShapeUtil.configure({
customGeoTypes: {
"my-shape": {
getPath: (w, h) =>
new PathBuilder()
.moveTo(0, 0)
.lineTo(w, 0)
.lineTo(w, h)
.lineTo(0, h)
.close(),
snapType: "polygon",
icon: "geo-rectangle",
},
},
});showTextOutline
showTextOutline: boolean;Methods
getCustomDisplayValues
Parameters
Returns
Partial<DisplayValues>;getDefaultDisplayValues
Parameters
Returns
DisplayValues;Prev
FrameShapeUtilDisplayValuesNext
GeoShapeUtilDisplayValues