File tree 1 file changed +2
-4
lines changed
src/modules/esl-scrollbar/core
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ export class ESLScrollbar extends ESLBaseElement {
177
177
178
178
public set position ( position : number ) {
179
179
this . scrollTargetTo ( this . scrollableSize * this . normalizePosition ( position ) ) ;
180
- this . update ( ) ;
180
+ this . refresh ( ) ;
181
181
}
182
182
183
183
/** Normalizes position value (between 0.0 and 1.0) */
@@ -198,7 +198,6 @@ export class ESLScrollbar extends ESLBaseElement {
198
198
199
199
/** Updates thumb size and position */
200
200
public update ( ) : void {
201
- this . $$fire ( 'esl:change:scroll' , { bubbles : false } ) ;
202
201
if ( ! this . $scrollbarThumb || ! this . $scrollbarTrack ) return ;
203
202
const thumbSize = this . trackOffset * this . thumbSize ;
204
203
const thumbPosition = ( this . trackOffset - thumbSize ) * this . position ;
@@ -221,6 +220,7 @@ export class ESLScrollbar extends ESLBaseElement {
221
220
public refresh ( ) : void {
222
221
this . update ( ) ;
223
222
this . updateMarkers ( ) ;
223
+ this . $$fire ( 'esl:change:scroll' , { bubbles : false } ) ;
224
224
}
225
225
226
226
/** Returns position from MouseEvent coordinates (not normalized) */
@@ -289,8 +289,6 @@ export class ESLScrollbar extends ESLBaseElement {
289
289
const scrollableAreaHeight = this . trackOffset - this . thumbOffset ;
290
290
const absChange = scrollableAreaHeight ? ( positionChange / scrollableAreaHeight ) : 0 ;
291
291
this . position = this . _initialPosition + absChange ;
292
-
293
- this . updateMarkers ( ) ;
294
292
}
295
293
296
294
/** `mousemove` document handler for thumb drag event. Active only if drag action is active */
You can’t perform that action at this time.
0 commit comments