Page layout refactoring (#14535)
In this PR: - Refactored the page layout renderer - Converted all the states to component states - Removed the page layout edition in settings TODOs in next PRs: - Fix bug with the drag selector not taking the scroll into account to display the dragged area - Readd the tab edition in edit mode
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
export const calculateGridCellPosition = ({
|
||||
index,
|
||||
numberOfColumns,
|
||||
}: {
|
||||
index: number;
|
||||
numberOfColumns: number;
|
||||
}) => {
|
||||
const column = index % numberOfColumns;
|
||||
const row = Math.floor(index / numberOfColumns);
|
||||
|
||||
return { row, column };
|
||||
};
|
||||
Reference in New Issue
Block a user