From 366487f3b655f6c8bee4ce85431f61a4fbac5cb6 Mon Sep 17 00:00:00 2001 From: Josh Kelley Date: Tue, 24 May 2022 09:50:34 -0400 Subject: [PATCH] Further update comments --- docs/guide/developers.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guide/developers.md b/docs/guide/developers.md index 264a97f3..41b9d053 100644 --- a/docs/guide/developers.md +++ b/docs/guide/developers.md @@ -44,7 +44,7 @@ Returns whether the chart has been zoomed or panned - i.e. whether the initial s ## Custom Scales -You can extend chartjs-plugin-zoom with support for [custom scales](https://www.chartjs.org/docs/latest/developers/axes.html) by using the zoom plugin's `zoomFunctions` and `panFunctions` members. These objects are indexed by scale types (scales' `id` members) and give optional handlers for zoom and pan functionality. +You can extend chartjs-plugin-zoom with support for [custom scales](https://www.chartjs.org/docs/latest/developers/axes.html) by using the zoom plugin's `zoomFunctions`, `zoomRectFunctions`, and `panFunctions` members. These objects are indexed by scale types (scales' `id` members) and give optional handlers for zoom and pan functionality. ```js import {Scale} from 'chart.js'; @@ -59,8 +59,8 @@ MyScale.defaults = defaultConfigObject; zoomPlugin.zoomFunctions.myScale = (scale, zoom, center, limits) => false; zoomPlugin.zoomRectFunctions.myScale = (scale, from, to, limits) => false; zoomPlugin.panFunctions.myScale = (scale, delta, limits) => false; -// zoomRectFunctions can normally be omitted; chartjs-plugin-zoom can translate -// to an equivalent zoomFunctions call. +// zoomRectFunctions can normally be omitted, since zooming by specific pixel +// coordinates rarely needs special handling. ``` The zoom, zoomRect, and pan functions take the following arguments: