Calculations like this were created with the understanding that the sheet would always be positioned cleanly on the edge of a row and column. For example, if you have a chart, Excel calculates the position where the chart should be displayed based on the distance from the top left cell. To understand why there were issues with positioning objects on the sheet, it’s helpful to know that the position of the sheet (which cell is in the top-left corner of the visible area) is fundamental to just about everything that gets displayed in Excel. One set of issues dealt with the positioning of objects on the sheet, and the other set of issues related to how objects are displayed while you’re scrolling. We found 2 main types of issues as a result of not snapping to the edges and scrolling smoothly. In fact, we learned that this change impacted many things in Excel. ![]() It may seem straightforward to smooth things out, but we knew there could be some side effects to not snapping. After all, it should be a simple matter of removing a few lines of code that causes the sheet to snap. Many who’ve asked for Excel to stop snapping when you’re trying to scroll just a little have also asked why this wasn’t done a long time ago. It provides an interesting peek at the complexities of making even small changes to Excel, which has been around for decades and has so many features. Drag the scroll bar to see that you can scroll with precision and you can stop anywhere you like.Īll you need to know is that Excel will scroll better, but we wanted to share more about the story of this improvement.Increase the height on some rows in your spreadsheet and scroll using your mouse wheel or touch pad to see that you can stop partway through a row, and avoid snapping to the top.If your Windows setting is to move 1 line for each click of the scroll wheel, it will move by line of text rather than by 1 row of your worksheet. If you don’t have a “precision” mouse or touch pad, each movement will be based on the height of one line of text. * Depending on the mouse or touch pad you’re using, you may not be able to scroll one pixel at a time. Second, and most importantly, you can stop scrolling partway through a row or column, and Excel won’t force you to go any further than you want.First, it’s smoother during the scroll when using either the mouse wheel* or the scrollbars (touch screen and touch pad already scrolled smoothly).We fixed the issue by making the scrolling much smoother-there are 2 parts to this update. Many of you requested that we improve the way this works, and that’s just what we’ve done. When you’re scrolling in a sheet with very large cells, the way Excel for Windows snapped to the grid made it hard to view your data. The bold text in row 2 says "We're happy to anounce New in Excel for Windows: Smooth Scrolling". Short video showing an Excel sheet that scrolls and stops partway through row 2, then scrolls to show row 1. In fact, we learned that this change affects many different aspects of Excel, including freezing panes, resizing rows, cutting and pasting, filtering, cell styles, comments, dragging and filling, and more. Though you might think this is an easy fix, simply requiring the alteration of a few lines of code, there’s actually a lot more to it. ![]() The main reason for this issue is that Excel automatically snapped to the top-left cell as you scrolled. var rootElement = document.We’ve heard from many of you that it can be difficult to scroll through a worksheet with large cells and view all the data. ![]() ![]() So, next let’s save it in a variable called rootElement - that way it’s easier to call in the code. Now document.documentElement returns the root element of the document. var scrollToTopBtn = document.getElementById("scrollToTopBtn") Option 1: Keep it simpleįirst, we select the button in JavaScript. Let’s look at a few ways we can do this, starting simple, then improving things as we go. But visually, we are looking for it to be non-obtrusive while still being a large enough target to tap or click. They are pretty easy to create with JavaScript. Those buttons usually float in the bottom corner of sites and then take you back to the top of the page when clicked. This can be very useful when the page has a lot of content or which happens, for example, on one page websites, when infinite scrolling is used, or on mobile devices where different screen sizes can cause the content to scroll extend. A button to return to the top of the page allows the user to quickly return to the top of the page without making too much effort.
0 Comments
Leave a Reply. |