Comments (5)
So we need to implement a different scrolling mechanism. We will most likely add some setting that will change the default scroll behavior and will work based on pixels and not rows. We will try to implement it as soon as possible and will leave info here when we are done.
from gantt-schedule-timeline-calendar.
@neuronetio , thank you very much for your quick reaction!
from gantt-schedule-timeline-calendar.
Works like a charm, thanks
from gantt-schedule-timeline-calendar.
under "laggy" I mean that when you scroll with a mouse wheel or trackpad, the scroll always jump to the next/previous row
from gantt-schedule-timeline-calendar.
New functionality has been added in version 3.34.0
.
To use it, you need to set the byPixels: true
option for each scroll configuration.
const config = {
/* ... */
scroll: {
horizontal: {
multiplier: 0.3,
precise: true,
byPixels: true,
},
vertical: {
multiplier: 0.3,
precise: true,
byPixels: true,
},
},
/* ... */
};
But there is a little catch. If you use api.setScrollLeft
or api.setScrollTop
anywhere in your code, you must pass an absolute offset (not rowId or dataIndex as in normal mode) as an argument.
So when byPixels
is set to false
- nothing changes, but when set to true
then setScrollLeft
and setScrollTop
work in offset mode (in pixels).
Example setScrollLeft
with byPixels
enabled:
const configScroll = this.state.get('config.scroll.horizontal');
const scrollLeft = this.api.getScrollLeft();
if (configScroll.byPixels) {
this.api.setScrollLeft(scrollLeft.absolutePosPx + 1); // offset + 1 pixel
} else {
this.api.setScrollLeft(scrollLeft.dataIndex + 1); // offset + one date
}
from gantt-schedule-timeline-calendar.
Related Issues (20)
- Updating the state causes "weeks" calendar level to rebuild with the default "weekStart" HOT 9
- How to display milestone in a diamond shape? HOT 1
- Duplicate items appear when resizing the window HOT 3
- Create new dependencies. HOT 3
- How to add click event to bookmarks ?
- How to sort items inside one row HOT 6
- How to add click event for the "progress-bar" HOT 3
- The data I returned comes with a specific parameter, can the data border be dashed HOT 1
- Select a certain piece of data and click on split to see if it can be split into two parts HOT 2
- Split a progress bar into two progress bars HOT 1
- Updated chart items, how to update the view HOT 3
- 3.33.16 move out stacking items not update row height HOT 11
- Unhandled typeerror out of nowhere reading 'dataIndex' HOT 2
- when the start date and end date is same the progress bar is not visible HOT 5
- Connection error HOT 1
- How to scroll to position vertically in coding?
- How to change the current column width by dragging the date cell like excel?
- Issue with Rendering Component After Upgrading GSTC to Latest Version HOT 2
- How to entegrate this plugin features to my .net core mvc html page ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gantt-schedule-timeline-calendar.