diff --git a/README.md b/README.md index e19e67ea..e4d6f31f 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ setTimeout(() => panzoom.pan(100, 100)) ▸ **Panzoom**(`elem`: HTMLElement | SVGElement, `options?`: Omit‹[PanzoomOptions](#PanzoomOptions), "force"›): _[PanzoomObject](#PanzoomObject)_ -_Defined in [panzoom.ts:49](https://github.com/timmywil/panzoom/blob/3f1f525/src/panzoom.ts#L49)_ +_Defined in [panzoom.ts:49](https://github.com/timmywil/panzoom/blob/c014fd1/src/panzoom.ts#L49)_ **Parameters:** @@ -157,7 +157,7 @@ Includes `MiscOptions`, `PanOptions`, and `ZoomOptions` • **animate**? : _boolean_ (Default: **false**) -_Defined in [types.ts:13](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L13)_ +_Defined in [types.ts:13](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L13)_ Whether to animate transitions @@ -167,7 +167,7 @@ Whether to animate transitions • **duration**? : _number_ (Default: **200**) -_Defined in [types.ts:15](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L15)_ +_Defined in [types.ts:15](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L15)_ Duration of the transition (ms) @@ -177,7 +177,7 @@ Duration of the transition (ms) • **easing**? : _string_ (Default: **"ease-in-out"**) -_Defined in [types.ts:17](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L17)_ +_Defined in [types.ts:17](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L17)_ CSS Easing used for transitions @@ -187,7 +187,7 @@ CSS Easing used for transitions • **exclude**? : _Element[]_ -_Defined in [types.ts:24](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L24)_ +_Defined in [types.ts:24](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L24)_ Add elements to this array that should be excluded from Panzoom handling. @@ -200,7 +200,7 @@ e.g. links and buttons that should not propagate the click event. • **excludeClass**? : _string_ (Default: **"panzoom-exclude"**) -_Defined in [types.ts:31](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L31)_ +_Defined in [types.ts:31](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L31)_ Add this class to any element within the Panzoom element that you want to exclude from Panzoom handling. That @@ -213,7 +213,7 @@ e.g. links and buttons that should not propagate the click event. • **force**? : _boolean_ -_Defined in [types.ts:47](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L47)_ +_Defined in [types.ts:47](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L47)_ `force` should be used sparingly to temporarily override and ignore options such as disablePan, @@ -235,7 +235,7 @@ panzoom.zoom(1, { force: true }) • **handleStartEvent**? : _function_ -_Defined in [types.ts:71](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L71)_ +_Defined in [types.ts:71](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L71)_ On the first pointer event, when panning starts, the default Panzoom behavior is to call @@ -275,7 +275,7 @@ Panzoom(elem, { • **origin**? : _string_ -_Defined in [types.ts:85](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L85)_ +_Defined in [types.ts:85](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L85)_ **Change this at your own risk.** The `transform-origin` is the origin from which transforms are applied. @@ -295,7 +295,7 @@ And again, changing this for SVG in IE doesn't work at all. • **overflow**? : _string_ (Default: **"hidden"**) -_Defined in [types.ts:87](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L87)_ +_Defined in [types.ts:87](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L87)_ The overflow CSS value for the parent. Defaults to 'hidden' @@ -305,7 +305,7 @@ The overflow CSS value for the parent. Defaults to 'hidden' • **setTransform**? : _setTransform_ -_Defined in [types.ts:105](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L105)_ +_Defined in [types.ts:105](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L105)_ Override the transform setter. This is exposed mostly so the user could @@ -329,7 +329,7 @@ const panzoom = Panzoom(elem, { • **silent**? : _boolean_ -_Defined in [types.ts:107](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L107)_ +_Defined in [types.ts:107](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L107)_ Silence all events @@ -339,7 +339,7 @@ Silence all events • **startScale**? : _number_ (Default: **1**) -_Defined in [types.ts:113](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L113)_ +_Defined in [types.ts:113](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L113)_ Scale used to set the beginning transform @@ -349,7 +349,7 @@ Scale used to set the beginning transform • **startX**? : _number_ (Default: **0**) -_Defined in [types.ts:109](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L109)_ +_Defined in [types.ts:109](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L109)_ X Value used to set the beginning transform @@ -359,7 +359,7 @@ X Value used to set the beginning transform • **startY**? : _number_ (Default: **0**) -_Defined in [types.ts:111](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L111)_ +_Defined in [types.ts:111](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L111)_ Y Value used to set the beginning transform @@ -373,7 +373,7 @@ Includes `MiscOptions` • **contain**? : _"inside" | "outside"_ -_Defined in [types.ts:130](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L130)_ +_Defined in [types.ts:130](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L130)_ Contain the panzoom element either inside or outside the parent. @@ -391,7 +391,7 @@ empty space around the element will be shown. • **cursor**? : _string_ (Default: **"move"**) -_Defined in [types.ts:132](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L132)_ +_Defined in [types.ts:132](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L132)_ The cursor style to set on the panzoom element @@ -401,7 +401,7 @@ The cursor style to set on the panzoom element • **disablePan**? : _boolean_ (Default: **false**) -_Defined in [types.ts:138](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L138)_ +_Defined in [types.ts:138](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L138)_ Disable panning functionality. Note: disablePan does not affect focal point zooming or the constrain option. @@ -413,7 +413,7 @@ The element will still pan accordingly. • **disableXAxis**? : _boolean_ (Default: **false**) -_Defined in [types.ts:140](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L140)_ +_Defined in [types.ts:140](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L140)_ Pan only on the Y axis @@ -423,7 +423,7 @@ Pan only on the Y axis • **disableYAxis**? : _boolean_ (Default: **false**) -_Defined in [types.ts:142](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L142)_ +_Defined in [types.ts:142](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L142)_ Pan only on the X axis @@ -433,7 +433,7 @@ Pan only on the X axis • **panOnlyWhenZoomed**? : _boolean_ (Default: **false**) -_Defined in [types.ts:146](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L146)_ +_Defined in [types.ts:146](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L146)_ Disable panning while the scale is equal to the starting value @@ -443,7 +443,7 @@ Disable panning while the scale is equal to the starting value • **relative**? : _boolean_ (Default: **false**) -_Defined in [types.ts:144](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L144)_ +_Defined in [types.ts:144](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L144)_ When passing x and y values to .pan(), treat the values as relative to their current values @@ -457,7 +457,7 @@ Includes `MiscOptions` • **disableZoom**? : _boolean_ (Default: **false**) -_Defined in [types.ts:151](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L151)_ +_Defined in [types.ts:151](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L151)_ Disable zooming functionality @@ -467,7 +467,7 @@ Disable zooming functionality • **focal**? : _object_ -_Defined in [types.ts:158](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L158)_ +_Defined in [types.ts:158](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L158)_ Zoom to the given point on the panzoom element. This point is expected to be relative to @@ -486,7 +486,7 @@ to the parent dimensions. • **maxScale**? : _number_ (Default: **4**) -_Defined in [types.ts:162](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L162)_ +_Defined in [types.ts:162](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L162)_ The maximum scale when zooming @@ -496,7 +496,7 @@ The maximum scale when zooming • **minScale**? : _number_ (Default: **0.125**) -_Defined in [types.ts:160](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L160)_ +_Defined in [types.ts:160](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L160)_ The minimum scale when zooming @@ -506,7 +506,7 @@ The minimum scale when zooming • **step**? : _number_ (Default: **0.3**) -_Defined in [types.ts:164](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L164)_ +_Defined in [types.ts:164](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L164)_ The step affects zoom calculation when zooming with a mouse wheel, when pinch zooming, or when using zoomIn/zoomOut @@ -520,7 +520,7 @@ These methods are available after initializing Panzoom • **destroy**: _function_ -_Defined in [types.ts:179](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L179)_ +_Defined in [types.ts:179](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L179)_ Remove all event listeners bind to the the Panzoom element @@ -534,7 +534,7 @@ Remove all event listeners bind to the the Panzoom element • **getOptions**: _function_ -_Defined in [types.ts:185](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L185)_ +_Defined in [types.ts:185](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L185)_ Returns a _copy_ of the current options object @@ -548,7 +548,7 @@ Returns a _copy_ of the current options object • **getPan**: _function_ -_Defined in [types.ts:181](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L181)_ +_Defined in [types.ts:181](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L181)_ Get the current x/y translation @@ -566,7 +566,7 @@ Get the current x/y translation • **getScale**: _function_ -_Defined in [types.ts:183](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L183)_ +_Defined in [types.ts:183](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L183)_ Get the current scale @@ -580,7 +580,7 @@ Get the current scale • **pan**: _function_ -_Defined in [types.ts:196](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L196)_ +_Defined in [types.ts:196](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L196)_ Pan the Panzoom element to the given x and y coordinates @@ -609,7 +609,7 @@ panzoom.pan(10, 10, { relative: true }) • **reset**: _function_ -_Defined in [types.ts:209](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L209)_ +_Defined in [types.ts:209](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L209)_ Reset the pan and zoom to startX, startY, and startScale. Animates by default, ignoring the global option. @@ -638,7 +638,7 @@ panzoom.reset({ animate: false }) • **setOptions**: _function_ -_Defined in [types.ts:211](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L211)_ +_Defined in [types.ts:211](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L211)_ Change options for the Panzoom instance @@ -658,7 +658,7 @@ Change options for the Panzoom instance • **setStyle**: _function_ -_Defined in [types.ts:213](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L213)_ +_Defined in [types.ts:213](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L213)_ A convenience method for setting prefixed styles on the Panzoom element @@ -679,7 +679,7 @@ A convenience method for setting prefixed styles on the Panzoom element • **zoom**: _function_ -_Defined in [types.ts:222](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L222)_ +_Defined in [types.ts:222](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L222)_ Zoom the Panzoom element to the given scale @@ -705,7 +705,7 @@ panzoom.zoom(2.2, { animate: true }) • **zoomIn**: _function_ -_Defined in [types.ts:233](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L233)_ +_Defined in [types.ts:233](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L233)_ Zoom in using the predetermined increment set in options. Animates by default, ignoring the global option. @@ -732,7 +732,7 @@ panzoom.zoomIn({ animate: false }) • **zoomOut**: _function_ -_Defined in [types.ts:244](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L244)_ +_Defined in [types.ts:244](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L244)_ Zoom out using the predetermined increment set in options. Animates by default, ignoring the global option. @@ -759,7 +759,7 @@ panzoom.zoomOut({ animate: false }) • **zoomToPoint**: _function_ -_Defined in [types.ts:255](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L255)_ +_Defined in [types.ts:255](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L255)_ Zoom the Panzoom element to a focal point using the given pointer/touch/mouse event or constructed point. @@ -793,7 +793,7 @@ panzoom.zoomToPoint(1.2, pointerEvent) • **zoomWithWheel**: _function_ -_Defined in [types.ts:284](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L284)_ +_Defined in [types.ts:284](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L284)_ Zoom the Panzoom element to a focal point using the given WheelEvent @@ -837,7 +837,7 @@ elem.parentElement.addEventListener('wheel', function(event) { • **scale**: _number_ -_Defined in [types.ts:174](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L174)_ +_Defined in [types.ts:174](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L174)_ --- @@ -845,7 +845,7 @@ _Defined in [types.ts:174](https://github.com/timmywil/panzoom/blob/3f1f525/src/ • **x**: _number_ -_Defined in [types.ts:172](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L172)_ +_Defined in [types.ts:172](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L172)_ --- @@ -853,7 +853,7 @@ _Defined in [types.ts:172](https://github.com/timmywil/panzoom/blob/3f1f525/src/ • **y**: _number_ -_Defined in [types.ts:173](https://github.com/timmywil/panzoom/blob/3f1f525/src/types.ts#L173)_ +_Defined in [types.ts:173](https://github.com/timmywil/panzoom/blob/c014fd1/src/types.ts#L173)_ ## Events diff --git a/package.json b/package.json index 2e54e7b2..8bc763fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@panzoom/panzoom", - "version": "4.0.1", + "version": "4.0.2", "description": "Pan and zoom elements anywhere using native transformations", "main": "dist/panzoom.js", "scripts": {