- Remove find of scrollabl elements logic.
- Change the default value of
container
frombody,html
towindow
.- If you specify
body,html
, it may cause unintended behaviors.
- If you specify
- Remove
quickMode
options.
- Fixed a performance problem in which unnecessary matching was execute in
onclick
handling.- Performance improves when there is a lot of DOM.
TypeScript support and file size down are the main changes. 3.x
is a version that contains many destructive changes.
- Support TypeScript 🎉
- Reduce file size by 43.04% !
- We reviewed many options and functions and cut unnecessary items.
- Add factory method (
SweetScroll.create(options?: PartialOptions, container?: string | Element)
)- This is useful if you do not like the coding style using
new
or you do not need to manage instances.
- This is useful if you do not like the coding style using
- IE9 was excluded from browser support
- It can correspond by using polyfill of
requestAnimationFrame
.
- It can correspond by using polyfill of
- Remove options
delay
outputLog
- Rename options
verticalScroll
->vertical
horizontalScroll
->horizontal
stopScroll
->cancellable
beforeScroll
->before
afterScroll
->after
canelScroll
->canel
completeScroll
->complete
stepScroll
->step
- Remove easings (You can use the same easing by passing the function described in README instead.)
easeInElastic
easeOutElastic
easeInOutElastic
easeInBack
easeOutBack
easeInOutBack
easeInBounce
easeOutBounce
easeInOutBounce
- Remove
distance
argument pattern- Object like string (
top:0, left:100
)
- Object like string (
- Rename callback methods
beforeScroll
->onBefore
afterScroll
->onAfter
cancelScroll
->onCancel
completeScroll
->onComplete
stepScroll
->onStep
- Fixed headers can now be specified from elements. (
header
) - Add an instance to the final argument to the optional callback.
- It corresponds to a problem that can not refer to
this
when using arrow function.
- It corresponds to a problem that can not refer to
- Support server-side rendering
- Add
quickMode
options- Instantly scroll to the destination! (It's recommended to use it with
easeOutExpo
)
- Instantly scroll to the destination! (It's recommended to use it with
- Update doc
- Update devDependencies
- Change to silent error if container element is not found. (Outputable with
outputLog
option) - Minor change in log messages
- Fix demo page can't be viewed locally
- Add loging tests
Related issues #31. Thanks @nickclaw!!
- Need to initialize an instance after
DOMContentLoaded
. (So far it has been listening in the library.)- In many cases, since there is no need to be initialized before DOMContentLoaded.
- Removed
initialized
callback & method. - Removed
searchContainerTimeout
options.
- Update doc
- Update design of demo page
- Update devDependencies
- Change some of output log
- Update some tests
- Add
searchContainerTimeout
options- We changed the find logic of container element. Because there is a possibility of Timeout Along with it was to add this option.
- Add
outputLog
options- In order to aid in debugging has been added the output of the warning log.
- Add
yarn.lock
- Update devDependencies
- Fix some tests
- Fixed a bug related to the container. (ref: #27)
- Fix Chrome/Safari: scroll doesn't fire when browser zoom is less than 100% (ref: #23)
- Add this
CHANGELOG.md
(ref: #21) - Change the distribution file in npm (limited to
src
,test
,sweet-scroll.js
,sweet-scroll.min.js
) - Update devDependencies
- Fix lint
- Update devDependencies
- Fix issue #17
- Change to npm scripts from Gulp the development environment
- Update eslint config and fix lint
- Refactor for file size reduction.
- Published first major version!!
- Add
"push"
+"replace"
toupdateURL
options
- Add
step
callback, and method
- Refactor for
initialized
- Fix of viewport and element size
- Bugfix that value of the
data-options
do not receive - Add fallback for
DOMContentLoaded
event - Some rafactor
- Add
preventDefault
&stopPropagation
options #11
- Add
completeScroll
callback, and method - Fix comparison of the instance type.
HTMLElement
->HTMLElement
- Change before to after update url timing
- Bugfix that occur at the time of URL update of
file:
protocol.
- Add
updateURL
option
- Bugfix & Update tests
- Change the method of handling a
DOMContentLoaded
- Add
initialized
callback, and method - Change to initialization of an instance in async
- Refactor for file size reduction.
- Update LICENSE (copyright)
- Add Callback Method tests & refactor
- Add callback methods (
beforeScroll
,cancelScroll
,afterScroll
)
- Fix coordinate calculation of data-scroll-header
- Add
toElement
method - Some refactor
- Fix lint & Fix typo in docs
- Refactor
- Fix minimum value of
scrollTop
andscrollLeft
- Add update method
- Fix Scroll position bug, case of a fixed header specified
- Update passes the trigger elements to the callback
- Fix #1 horizontal scroll bug
- Update Specifies the container in the HTMLElement
- Fix get of scrollabel elements
- Add data options
- Add relative position syntax
- Published