Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Series of github actions are used to automate the library [releases](https://git
`release-drafter` action updates a draft of release notes after each push. Its based on labels and the commit messages, so its important to label pull requests and have clean commits. If the draft contains commits that do not fall under any heading, those commits should be labeled and the drafter re-run from [actions](https://github.com/chartjs/chartjs-plugin-zoom/actions).

1. update `master` `package.json` version using [semver](https://semver.org/) semantic
1. update the tag and version in the release draft to match `package.json`. Mark it as `pre-release` if you would like to publis with `next` tag on [npmjs](https://www.npmjs.com/package/chartjs-plugin-zoom)
1. update the tag and version in the release draft to match `package.json`. Mark it as `pre-release` if you would like to publish with `next` tag on [npmjs](https://www.npmjs.com/package/chartjs-plugin-zoom)
1. publish the release in GitHub. Publishing will trigger the `publish-npm` action. You can monitor the process in [actions](https://github.com/chartjs/chartjs-plugin-zoom/actions)

### Automated Tasks
Expand Down
4 changes: 2 additions & 2 deletions docs/guide/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const chart = new Chart('id', {
| ---- | --------- | -----------
| `onPan` | `{chart}` | Called while the chart is being panned
| `onPanComplete` | `{chart}` | Called once panning is completed
| `onPanRejected` | `{chart,event}` | Called when panning is rejected due to missing modifier key. `event` is the a [hammer event](https://hammerjs.github.io/api#event-object) that failed
| `onPanRejected` | `{chart,event}` | Called when panning is rejected due to missing modifier key. `event` is a [Hammer event](https://hammerjs.github.io/api#event-object) that failed
| `onPanStart` | `{chart,event,point}` | Called when panning is about to start. If this callback returns false, panning is aborted and `onPanRejected` is invoked

## Zoom
Expand Down Expand Up @@ -105,7 +105,7 @@ The `drawTime` option for zooming determines where in the chart lifecycle the dr
| ---- | --------- | -----------
| `onZoom` | `{chart}` | Called while the chart is being zoomed
| `onZoomComplete` | `{chart}` | Called once zooming is completed
| `onZoomRejected` | `{chart,event}` | Called when zoom is rejected due to missing modifier key. `event` is the a [hammer event](https://hammerjs.github.io/api#event-object) that failed
| `onZoomRejected` | `{chart,event}` | Called when zoom is rejected due to missing modifier key. `event` is a [Hammer event](https://hammerjs.github.io/api#event-object) that failed
| `onZoomStart` | `{chart,event,point}` | Called when zooming is about to start. If this callback returns false, zooming is aborted and `onZoomRejected` is invoked

## Limits
Expand Down
2 changes: 1 addition & 1 deletion docs/samples/wheel/click-zoom.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
::: tip NOTE

The following text is there on purpose, so the page is scrollable.
This demoes that the chart does not consume the wheel until clicked.
This demos that the chart does not consume the wheel until clicked.

:::

Expand Down
6 changes: 3 additions & 3 deletions types/options.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export interface ZoomOptions {
*/
onZoomRejected?: (context: { chart: Chart, event: Event }) => void;

onZoomStart?: (context: { chart: Chart, event: Event, point: Point }) => void;
onZoomStart?: (context: { chart: Chart, event: Event, point: Point }) => boolean | undefined;
}

/**
Expand All @@ -137,7 +137,7 @@ export interface PanOptions {
* return 'xy';
* },
*/
mode?: Mode | { (char: Chart): Mode };
mode?: Mode | { (chart: Chart): Mode };

/**
* Modifier key required for panning with mouse
Expand Down Expand Up @@ -165,7 +165,7 @@ export interface PanOptions {

/**
* Function called when pan fails because modifier key was not detected.
* event is the a hammer event that failed - see https://hammerjs.github.io/api#event-object
* event is the Hammer event that failed - see https://hammerjs.github.io/api#event-object
*/
onPanRejected?: (context: { chart: Chart, event: HammerInput }) => void;

Expand Down
Loading