0.0.2 • Published 1 year ago
sol-drawmap-lib v0.0.2
SolDrawmapLib
This library was generated with Angular CLI version 15.0.0.
Setup custom mode:
import { CustomDrawStyles, SnapPolygonMode, SnapLineMode, SnapPointMode } from 'sol-drawmap-lib';
/* ... */
new MapboxDraw({
keybindings: true,
touchEnabled: true,
userProperties: true,
styles: CustomDrawStyles,
modes: {
...MapboxDraw.modes,
snap_line: SnapLineMode,
snap_point: SnapPointMode,
snap_polygon: SnapPolygonMode,
},
snap: true,
snapOptions: {
guides: true, /* Guideline on draw */
dragable: false, /* Drag feature on direction mode */
snapPx: 5, // defaults to 15
snapToMidPoints: false, // defaults to false
snapVertexPriorityDistance: 0.0025, // 0.0025 - defaults to 1.25
}
});