panzoom

A library for panning and zooming elements using CSS transforms

MIT License

Downloads
130K
Stars
2.1K
Committers
11

Bot releases are hidden (Show)

panzoom - Release 4.5.1 Latest Release

Published by timmywil about 2 years ago

4.5.1 (2022-09-06)

Bug Fixes

  • types: export all typescript types (b287e0d)
panzoom - Release 4.5.0

Published by timmywil over 2 years ago

4.5.0 (2022-05-27)

Features

  • add pinchAndPan option to enable panning during pinch zoom (#607) (f5bc3ac)
  • panzoom: expose the pointer event handlers (1c97ddd)

Bug Fixes

  • move: pass the original event to zoomToPoint calls (ea78bd1)
panzoom - Release 4.4.4

Published by timmywil over 2 years ago

4.4.4 (2022-01-31)

Bug Fixes

  • constrain: always get new dimensions when constraining scale (834f7f6)
  • roundpixels: roundPixels should affect x/y in constrain (174cbb4)
panzoom - Release 4.4.3

Published by timmywil almost 3 years ago

4.4.3 (2021-10-29)

Bug Fixes

  • pan: avoid triggering the pan event if no change (2e95244)
panzoom - Release 4.4.2

Published by timmywil almost 3 years ago

4.4.2 (2021-10-20)

Bug Fixes

  • events: fire off change events after setting transform (39524b1)
  • start: start options should ignore disable options (77b47b7)
  • zoomwithwheel: animate should always be disabled when zooming with wheel (c757931)
panzoom - Release 4.4.1

Published by timmywil over 3 years ago

4.4.1 (2021-06-11)

Bug Fixes

  • contain: account for scale with contain: inside (2bdc559)
  • pinchzoom: don't call pan during pinch zoom (22fb0b3)
panzoom - Release 4.4.0

Published by timmywil over 3 years ago

4.4.0 (2021-05-05)

Features

  • events: add originalEvent to custom events detail (82722ff)
  • resetstyle: add resetStyle method for removing all panzoom styles (ac15832)
panzoom - 4.3.2

Published by timmywil about 4 years ago

4.3.2 (2020-09-09)

Bug Fixes

  • release with build change (28f94ff)
panzoom - 4.3.1

Published by timmywil about 4 years ago

4.3.1 (2020-07-21)

Bug Fixes

  • check for window and document to allow ssr loading (3a0119e), closes #499
panzoom - 4.3.0

Published by timmywil about 4 years ago

4.3.0 (2020-07-20)

Features

  • bind: add bind method and noBind option (e5e1a30), closes #496

Reverts

  • Revert "docs(demo): remove unnecessary window declaration" (bd299d8)
panzoom - 4.2.0

Published by timmywil over 4 years ago

4.2.0 (2020-07-07)

Features

  • events: expose event names used in the current browser (3e0dfac), closes #473
  • options: add touchAction option for setting the touch-action style (ae70878), closes #494 #492
panzoom - 4.1.0

Published by timmywil over 4 years ago

4.1.0 (2020-04-06)

Features

  • panzoom: add option for moving the child via the parent (6d9b309)
panzoom - 4.0.4

Published by timmywil over 4 years ago

4.0.4 (2020-03-27)

Bug Fixes

  • package: upgrade dependencies, including prettier to 2.0 (8d5dfa5)
  • panzoom: export PanzoomObject and PanzoomOptions (8f48c2f), closes #470
panzoom - 4.0.3

Published by timmywil over 4 years ago

4.0.3 (2020-01-28)

Bug Fixes

  • ie: test demo in IE; fix isAttached,isExcluded,and SVG (d4f132c)
panzoom - 4.0.2

Published by timmywil almost 5 years ago

4.0.2 (2020-01-16)

Bug Fixes

  • zoomtopoint: should be able to override animate (e0e8190)
panzoom - 4.0.1

Published by timmywil almost 5 years ago

4.0.1 (2020-01-13)

Bug Fixes

  • reset: ignore disable and panOnlyWhenZoomed options (47f9e1b), closes #434
  • setoptions: bind/destroy depending on disablePan option (a773e2e), closes #439
panzoom - 4.0.0

Published by timmywil almost 5 years ago

4.0.0 (2019-12-16)

Bug Fixes

  • contain: always set scale before using constrainXY (761a0ec), closes #426
  • css: fix border width retrieval in Firefox (5d2f580)
  • events: fallback to touch and mouse events (#399) (2c4c303)
  • events: fix triggering panzoomend for one pointer event (f23e0fa), closes #428
  • handledown: exclude descendents of excluded parents (b2f943a), closes #431
  • handleup: remove pointer regardless of isPanning state (8938b29), closes #402 #403
  • reset: use setTransform passed to reset options (2adbb4e)
  • setoptions: set cursor style with the option (9c8efb4)
  • setstyle: remove unnecessary param from exposed setStyle (c9bcf94)
  • zoom: account for smaller elements and padding/border (3fe89a1)
  • zoom: need the before and after dimensions to constrain (7c2c982), closes #426
  • zoom: set min and max scale based on containment (d05f1e7), closes #426

Features

  • basic panning and zooming functionality (e80270f)
  • clean slate with typescript, rollup, and semantic-release (27a0887)
  • centering: switch to default transform origins (b483cda)
  • contain: add contain: 'outside' option (1571e99)
  • events: add custom events for panning and zooming (#398) (7713025)
  • exclude: add exclude option; change clickableClass to excludeClass (da72c32), closes #411
  • handlestartevent: add option to handle the start event (931743a), closes #414
  • overflow: add an option to override the parent's overflow (77032bb), closes #427
  • add a destroy method (#404) (c88ef75)
  • add animate option to transition the transforms (d9a8e67)
  • pan: add contain: 'inside' option (a7078e8)
  • pan: add panOnlyWhenZoomed option (5559967)
  • panzoom: add the force option (0ba521a), closes #413
  • zoom: implement focal point zooming without matrices (5d077f1)
  • zoom: pinch zooming with pointer events! (5ddbd30)

Performance Improvements

  • pan: make move/cancel listeners passive (f647163)

BREAKING CHANGES

  • This is a complete rewrite of the panzoom library
    to be a standard JS lib that doesn't rely on jQuery,
    but can still integrate as a plugin
panzoom - Fixes compatibility with jQuery 3.4+

Published by timmywil over 5 years ago

This is a small update to fix an error when accessing jQuery.cssProps, which no longer exists.

Note on next release

There are some known issues that have been in Panzoom for a while, but the rewrite is still in progress. I'll address as many issues as I can, but with everything changing, some old issues will become irrelevant and some new issues will be introduced. I will reopen GitHub issues when Panzoom 4.0 is ready.

panzoom - Pinch zoom bug fix on mobile devices

Published by timmywil about 8 years ago

  • Fixed an issue where a pinch zoom was not recognized unless both fingers touched at very nearly the same time. This should make it much more flexible. You can add a finger at any point during the gesture and both touches will be recognized.

See https://github.com/timmywil/jquery.panzoom/issues/270 for more info.

panzoom - Account for text-align, add back pointer events

Published by timmywil about 8 years ago

  • In 3.1.0 (see 20aa64a2460d28d8941e189335baedfb2f134747), I greatly simplified the contain logic. The complexity had piled up to the point where I didn't even understand it all. Unfortunately, I made a significant error and broke all panzoom elements that weren't display: inline with text-align: center–like the ones in the demo page. This patch adds back the logic necessary to contain elements that are not already centered. Note: Panzoom does not support text-align: right. Just set it to left or center.
  • I had also removed support for pointer events, but I broke panzoom for devices that have both a mouse and touch support (for instance, some Windows laptops). While Pointer Events can be problematic to support in IE10, IE11, and Edge, I was able to work around all of the problems that have been reported so far. Pointer Event support is now better than ever!
Package Rankings
Top 1.38% on Npmjs.org
Top 23.71% on Repo1.maven.org
Badges
Extracted from project README
Build Status