-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We're not able to align cells if the selection is made upward #6600
Comments
The issue is still replicable in v 8.0.0-beta1 https://jsfiddle.net/AMBudnik/zj7vabqf/ |
* Revert headers selection when all indexes are trimmed The header selection is restored by passing through the negative values through the whole library. This braking change forced all tests to be adjusted. Issue: #6998 * Separate coordinates context between WoT and HoT In this commit I separate how the coordinates are used within Walkontable and Handsontable context. The Walkontable renderer needs to know about negative coordinates as that module render the whole table. In The Handsontable context, however only coordinates for cells are important mostly. As in that context exists cell meta objects which exists only for cells. Issue: #6998 * Change getHight and getWidth methods Change methods in the same manner as was done for "getTopLeftCorner", "getOuterTopLeftCorner" and similar methods. Issue: #6998 * Fix getHight, getWidth for selection Issue: #6998 * Fix alignment and comments ops from context menu While fixing the negative coordinates I've spotted that alignment and comments command from context menu doesn't work when the selection was made in different direction that top-left to bottom-right. Issue: #6998, #6600 * Fix issues revealed after changing selection methods Adjust the logic how the selection was processed by the plugins. I removed all references to negative indexes. Issue: #6998 * Fix Border context menu command Add condition for retrieving only cell coordinates (ignoring header) Issue: #6998 * Fix wrong assumption The indexes equal to 0 are wrongly excluded from the borders logic. Issue: #6998 * Fix undoing merge cells and alignment operations When the header was selected and merged cells or alignment operations were undoing, an exception was thrown. This was caused by negative coordinates. I fixed this by excluding negative coordinates from the process. Issue: #6998 * Fix eslint complains Split long line. Issue: #6998 * Add tests for merge cells and alignment ops Issue: #6998 * Fix unresponsive AutoFill handler When the row or column header was selected the AutoFill handler was unresponsive on filling action. This is caused by negative coordinates. I fixed this by coords normalization. Issue: #6998 * Fix selection after autofill operation Issue: #6998 * Fix eslint complains Issue: #6998 * Fix editor positioning When row or column header was selected and enter was hit then the editor position was out of sync by 1px relative to the cell. I've corrected the condition in the editors code which includes 1px only for row and column equals to 0. Issue: #6998 * Make the logic for showColumn more consistent Consistent with the counterpart file (showRow.js) Issue: #6998 * Update src/editors/textEditor.js Co-authored-by: Wojciech Szymański <141330+wszymanski@users.noreply.github.com> * Update src/plugins/comments/test/comments.e2e.js Co-authored-by: Wojciech Szymański <141330+wszymanski@users.noreply.github.com> * Add ability to clone CellRange instance Issue: #6998 * Fix unselectable headers when all indexes are hidden The header selection generally contains cell selection coordinates. In a case when all rows (or columns) are hidden that visual coordinates are translated to renderable coordinates that do not exist. Hence no header highlight is generated. In that case, to make a column (or a row) header highlight, the row and column index has point to the header (the negative value). Issue: #7051 * Add ability to highlight headers for hidden indexes Add ability to highlight headers (gray color) when one of the indexes (row or column) are hidden and the second index is visible. To support header highlight for that cases the `getCorner` method of the Selection class is overwritten. There are two approaches to convince the header Selection to highlight specific headers. One overwrite the method which controls coordinates for headers (chosen approach for this commit) and second rewrite/adjust CellCoords, CellRange, and correct all methods that deal with numbers to support `null` values - to match changes. Issue: #7051 * Improve code readability Issue: #7051 * Change method name Issue: #7051 Co-authored-by: Wojciech Szymański <141330+wszymanski@users.noreply.github.com> Co-authored-by: Wojciech Szymański <141330+wszymanski@users.noreply.github.com>
Well done @budnix another issue solved for v8. https://jsfiddle.net/8wpt59bj/ |
Issue officially fixed in v 8.0.0. For anyone interested in this topic here are resources CDN https://cdn.jsdelivr.net/gh/handsontable/handsontable@latest/dist/handsontable.full.css NPM npm i handsontable Release Notes https://github.com/handsontable/handsontable/releases |
Description
We're not able to align cells if the selection is made upward.
Steps to reproduce
B3:A1
Center
Result
Nothin happens, the menu is closed.
Now:
A1:B3
Center
Result
Cells are aligned center, the menu is closed.
Demo
https://jsfiddle.net/qwyue5o6/
7.3.0
Your environment
It doesn't seem to be related to any version.
The text was updated successfully, but these errors were encountered: