Skip to content

Releases: scroll-into-view/scroll-into-view-if-needed

v2.1.1

29 Apr 20:11
5068ad9
Compare
Choose a tag to compare
v2.1.1 Pre-release
Pre-release

2.1.1 (2018-04-29)

Bug Fixes

  • the "nearest" position is working properly (#207) (5068ad9)

v2.1.0

28 Apr 18:02
8530621
Compare
Choose a tag to compare
v2.1.0 Pre-release
Pre-release

2.1.0 (2018-04-28)

Features

  • changelog: attempt to fix semantic-release (#205) (8530621)

v1.5.1

28 Apr 17:19
2ee61bd
Compare
Choose a tag to compare
v1.5.1 Pre-release
Pre-release

1.5.1 (2018-04-28)

Bug Fixes

smooth-scroll-into-view-if-needed-v1.0.1

22 Apr 23:34
bcca229
Compare
Choose a tag to compare

smooth-scroll-into-view-if-needed-v1.0.1 (2018-04-22)

Bug Fixes

  • ci: test semantic-release (83f07b9)

smooth-scroll-into-view-if-needed-v1.0.0

22 Apr 22:19
83e0b7d
Compare
Choose a tag to compare

smooth-scroll-into-view-if-needed-v1.0.0 (2018-04-22)

Bug Fixes

v1.5.0

25 Feb 23:34
d1e66a7
Compare
Choose a tag to compare

Added

  • sideEffects: false in package.json to enable optimizations introduced in webpack v4.

v1.4.1

21 Nov 23:58
Compare
Choose a tag to compare
  • Fixed: release-config
  • Fixed: formatting
  • Fixed: setup new release tag for test releases

v1.4.0

16 Nov 23:46
78973d3
Compare
Choose a tag to compare

Added

  • New handleScroll option allows customizing scrolling behavior.

Changed

  • Animation logic is separated from scroll calculation logic. This allows skip
    importing animation dependencies and reduces bundle sizes when you don't need
    the built in animation feature.

What this means

Take control over how the target is scrolled into view. This function is called
for each parent node that need scrolling. scrollLeft and scrollTop are
destination coordinates. The from coordinates you'll have to get yourself if you
want to animate the transition using a different library.

When using this option you likely don't need the built in animation feature. To
cut down on filesize you can do the following adjustment if you are using a
recent version of webpack or rollbar (and use ES6 imports):

-import scrollIntoViewIfNeeded from 'scroll-into-view-if-needed'
+import maybeScrollIntoView from 'scroll-into-view-if-needed/dist/calculate'
 
-scrollIntoViewIfNeeded(node)
+maybeScrollIntoView(node, {handleScroll: (parent, {scrollLeft, scrollTop}, config) => {
+  // The following is actually the default implementation
+  // if this is all you need you can skip passing this option
+  parent.scrollLeft = scrollLeft
+  parent.scrollTop = scrollTop
+}})

v1.3.0

12 Nov 03:59
18147e1
Compare
Choose a tag to compare

Introducing a simpler two argument API. Check the updated README.md for instructions!

v1.2.8

05 Nov 15:40
6cc8040
Compare
Choose a tag to compare
  • Fixed: Missing TypeScript definitions and rollup/webpack pkg.module files from published package (#145)