When using SpreadJS Designer, if you enter a very long text into a single cell, enable word wrap, and then attempt to scroll, you might notice that the scroll behavior is not smooth. Instead of gradually moving through the cell, the scroll jumps directly to adjacent cells. This behavior differs from the smoother scrolling experience in Excel.
sheet.setValue(0, 0, "This is a very long text that is going to wrap across multiple lines in the cell, making it tall and requiring smoother scrolling for better readability.");
sheet.getCell(0, 0).wordWrap(true);
In fact, this is the default behavior in SpreadJS. The scrolling is cell-based by default, which can cause large wrapped content to feel jumpy when scrolling.
To achieve a smoother, Excel-like scrolling experience, you need to enable pixel-based scrolling.
// Enable pixel-based scrolling
spread.options.scrollByPixel = true;
The scrollByPixel feature allows users to scroll through content pixel by pixel, rather than cell by cell, which enhances navigation especially when dealing with large, wrapped cells.
For more information about scrollByPixel and advanced scrolling behaviors, please refer to the official documentation here.
Kristina Ismail