Skip to content

Commit

Permalink
Event Documentation Discrepency
Browse files Browse the repository at this point in the history
Fix discrepancy in documentation on `finish` event context object
  • Loading branch information
ingalls authored Dec 31, 2024
1 parent 806e319 commit 661e915
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions guides/6.EVENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ The other Terra Draw events are:

```typescript
draw.on("finish", (id: string, context: { action: string, mode: string }) => {
if (action === 'draw') {
if (context.action === 'draw') {
// Do something for draw finish event
} else if (action === 'dragFeature') {
} else if (context.action === 'dragFeature') {
// Do something for a drag finish event
} else if (action === 'dragCoordinate') {
} else if (context.action === 'dragCoordinate') {
//
}else if (action === 'dragCoordinateResize') {
}else if (context.action === 'dragCoordinateResize') {
//
}
});
Expand Down Expand Up @@ -114,4 +114,4 @@ draw.on("deselect", () => {
5. [x] [Styling](./5.STYLING.md)
6. [x] Events
7. [ ] [Development](./7.DEVELOPMENT.md)
8. [ ] [Examples](./7.EXAMPLES.md)
8. [ ] [Examples](./7.EXAMPLES.md)

0 comments on commit 661e915

Please sign in to comment.