3.0.45 • Published 2 years ago

dynamic-virtual-scroller v3.0.45

Weekly downloads
118
License
ISC
Repository
github
Last release
2 years ago

Hi Github!

VirtualScroller requires jquery and lodash to be loaded beforehand. More documentation is coming soon...

History of this code

Naive approach (0.x)

First, we tried just using the native scrolling and adding/removing rows when needed. The scroller was also tightly coupled to the data at that point. This solution had a couple of drawbacks:

  • The scroller had too much responsibility and got pretty complex because it had to handle data and rendering
  • When implementing sticky rows, we noticed that they flicker if we move them via css (translate). Thats because native scrolling was faster than translate.
  • Virtual scrolling of columns was not possible in that implementation

Structure: container canvas

Using translate + native scrolling (1.x)

The next version of the scroller still used native scrolling but didn't render the items in the same container. Instead, we used a scrollContainer in the background that we could bind scroll events on and rendered to a second container that was on top of the other. So scrolling was still native but we moved the items using translate only (sticky and non-sticky). That way there was no more flickering. But unfortunately this solution did not play well with mobile because the events of the canvas-container and the scroll-container conflicted.

Structure: container scrollContainer scrollCanvas canvasContainer stickyCanvasContainer canvas

Using only translate (2.x)

Version 2 did not use native scrolling at all but instead recreates the behavior using the mousewheel event and then translating the content as if it was scrolled. That way we have total control over the scrolling process and only need one container.

Structure: container stickyCanvasContainer canvas

Mostly native again (3.x)

Version 3 uses native scrolling when possible in order to deliver the best scrolling performance on mobile. Only for sticky columns and rows, where native scrolling would lead to flickering, we use the translate-approach. You can also force the scoller to use translation for scrolling by setting useNativeScrollingWhenPossible to false.

3.0.45

2 years ago

3.0.44

4 years ago

3.0.43

4 years ago

3.0.42

5 years ago

3.0.41

5 years ago

3.0.40

5 years ago

3.0.39

5 years ago

3.0.38

5 years ago

3.0.37

5 years ago

3.0.36

5 years ago

3.0.35

5 years ago

3.0.34

5 years ago

3.0.33

5 years ago

3.0.32

5 years ago

3.0.31

5 years ago

3.0.30

5 years ago

3.0.29

5 years ago

3.0.28

5 years ago

3.0.27

5 years ago

3.0.26

5 years ago

3.0.25

5 years ago

3.0.24

5 years ago

3.0.23

5 years ago

3.0.22

5 years ago

3.0.21

5 years ago

3.0.20

6 years ago

3.0.19

6 years ago

3.0.18

6 years ago

3.0.17

6 years ago

3.0.16

6 years ago

3.0.15

6 years ago

3.0.14

6 years ago

3.0.13

6 years ago

3.0.12

6 years ago

3.0.11

6 years ago

3.0.10

6 years ago

3.0.9

6 years ago

3.0.8

6 years ago

3.0.7

6 years ago

3.0.6

6 years ago

3.0.5

6 years ago

3.0.4

6 years ago

3.0.3

6 years ago

3.0.2

6 years ago

3.0.1

6 years ago

3.0.0

6 years ago

2.2.8

7 years ago

2.2.7

7 years ago

2.2.6

7 years ago

2.2.5

7 years ago

2.2.4

7 years ago

2.2.3

7 years ago

2.2.2

7 years ago

2.2.1

7 years ago

2.2.0

7 years ago

2.1.0

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.2.21

7 years ago

1.2.20

7 years ago

1.2.19

7 years ago

1.2.18

7 years ago

1.2.17

7 years ago

1.2.16

7 years ago

1.2.15

7 years ago

1.2.14

7 years ago

1.2.13

7 years ago

1.2.12

7 years ago

1.2.11

7 years ago

1.2.10

7 years ago

1.2.9

7 years ago

1.2.8

7 years ago

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.9

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago