Skip to content

Account for text-align, add back pointer events

Compare
Choose a tag to compare
@timmywil timmywil released this 13 Aug 04:49
· 306 commits to main since this release
c5c6819
  • In 3.1.0 (see 20aa64a), 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!