You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,7 @@ In case you are using the browser version (directly including the script on your
98
98
VueScrollTo.setDefaults({
99
99
container:"body",
100
100
duration:500,
101
+
lazy:false,
101
102
easing:"ease",
102
103
offset:0,
103
104
force:true,
@@ -125,6 +126,7 @@ If you need to customize the scrolling options, you can pass in an object litera
125
126
el: '#element',
126
127
container: '#container',
127
128
duration: 500,
129
+
lazy: false
128
130
easing: 'linear',
129
131
offset: -200,
130
132
force: true,
@@ -151,6 +153,7 @@ var VueScrollTo = require('vue-scrollto');
151
153
var options = {
152
154
container:'#container',
153
155
easing:'ease-in',
156
+
lazy:false,
154
157
offset:-60,
155
158
force:true,
156
159
cancelable:true,
@@ -196,6 +199,11 @@ The easing to be used when animating. Read more in the [Easing section](#easing-
196
199
197
200
*Default:*`ease`
198
201
202
+
#### lazy
203
+
By default targetX/targetY are calculated once at the start of a scroll, however if the target may shift around during the scroll - setting `lazy` to `false` will force recalculation of targetX/targetY at each scroll step.
204
+
205
+
*Default:*`true`
206
+
199
207
#### offset
200
208
The offset that should be applied when scrolling. This option accepts a callback function since `v2.8.0`.
0 commit comments