aurelia / ui-virtualization

A plugin that provides a virtualized repeater and other virtualization services.
MIT License
90 stars 45 forks source link

Support horizontal virtualization #59

Open lgabeskiria opened 8 years ago

lgabeskiria commented 8 years ago

For more details see "Horizontal Usage" https://material.angularjs.org/latest/demo/virtualRepeat

AStoker commented 8 years ago

@levan-g: How are you hoping to use horizontal scrolling? Can you send me a DOM snippet of what you're wanting? We use CSS Columns for our horizontal scrolling, and am curious how other people accomplish this. Going to take a stab at getting it working.

lgabeskiria commented 8 years ago

@AStoker horizontal scrolling is usable in touch devices. There is a demo of horizontal scrolling on desktop with mousewheel http://codepen.io/ritz078/pen/bEYOov

AStoker commented 8 years ago

I could see that horizontal scrolling would work fine with a flag indicating the direction of the scrolling, that way we can determine the correct algorithm for determining how many items are to be displayed. But I'm trying to figure out if there's a way that we can determine that without a flag. And more so, if we can get that working without a flag and have it work with CSS Columns as well (which can have more than just 1 element per column). Ideas on that one @levan-g, or anybody else?

AStoker commented 8 years ago

@levan-g, working on horizontal scroll here to make a PR: https://github.com/AStoker/ui-virtualization Current remaining issue before I make a PR on it is when the user is scrolling very quickly, the indexes for which items to move get hosed, and you see empty slots where elements should be in the list. Feel free to take a look at it and maybe help with the problem.

mKlus commented 6 years ago

Hi guys. Is this now part of aurelia’s virt plugin? Or do I need to get AStoker’s version? Could you please post a simple snippet of the code with horizontal scrolling please?