Skip to content

Commit

Permalink
Expose chart.doSelectObjects and chart.trySelectObjects (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
mroloux authored Oct 24, 2024
1 parent 414c6e1 commit a28074e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,8 @@ new seatsio.SeatingChartDesigner({
})

// Seating chart tests
seatingChart.selectObjects(['A1', { label: 'someLabel', ticketType: 'aTicketType', amount: 2 }, { label: 'anotherLabel', amount: 2 }])
seatingChart.doSelectObjects(['A1', { label: 'someLabel', ticketType: 'aTicketType', amount: 2 }, { label: 'anotherLabel', amount: 2 }])
seatingChart.trySelectObjects(['A1', { label: 'someLabel', ticketType: 'aTicketType', amount: 2 }, { label: 'anotherLabel', amount: 2 }])
seatingChart.deselectObjects(['A1', { label: 'someLabel', ticketType: 'aTicketType', amount: 2 }])

seatingChart.listSelectedObjects().then(objects => {
Expand Down
6 changes: 4 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1346,7 +1346,8 @@ export interface SeatingChart {
resetView: () => Promise<void>
selectCategories: (categories: CategoryKey[]) => Promise<void>
selectedObjects: string[]
selectObjects: (objects: (string | SelectedAmount)[]) => Promise<void>
doSelectObjects: (objects: (string | SelectedAmount)[]) => Promise<void>
trySelectObjects: (objects: (string | SelectedAmount)[]) => Promise<void>
pulse: (objects: string []) => Promise<void>
unpulse: (objects: string []) => Promise<void>
startNewSession: () => Promise<void>
Expand All @@ -1369,7 +1370,8 @@ export interface EventManager extends Pick<SeatingChart,
| 'rerender'
| 'resetView'
| 'selectCategories'
| 'selectObjects'
| 'trySelectObjects'
| 'doSelectObjects'
| 'zoomToObjects'
| 'zoomToSection'
| 'zoomToSelectedObjects'
Expand Down

0 comments on commit a28074e

Please sign in to comment.