[TASK] Clean up various TypeScript code for SVG tree
This change reduces some redundancy in implementations for drag+drop for pagetree + folder tree, also adds some comments and adds some helper methods to make the code a tiny bit more understandable. In addition, to reduce our dependencies to d3-drag, the DragDropHandlers now receive the node and the original MouseEvent, as there is nothing else that the DragDrop handlers need for our solutions. Resolves: #99778 Releases: main Change-Id: Ia45a3ac5256d22ab38cf8c5d70fc4b939a53085a Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77654 Tested-by:Oliver Bartsch <bo@cedev.de> Tested-by:
core-ci <typo3@b13.com> Reviewed-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by:
Andreas Fernandez <a.fernandez@scripting-base.de>
Showing
- Build/Sources/TypeScript/backend/page-tree/page-tree-element.ts 107 additions, 57 deletions...Sources/TypeScript/backend/page-tree/page-tree-element.ts
- Build/Sources/TypeScript/backend/svg-tree.ts 15 additions, 13 deletionsBuild/Sources/TypeScript/backend/svg-tree.ts
- Build/Sources/TypeScript/backend/tree/drag-drop.ts 30 additions, 86 deletionsBuild/Sources/TypeScript/backend/tree/drag-drop.ts
- Build/Sources/TypeScript/backend/tree/file-storage-tree-container.ts 45 additions, 52 deletions...es/TypeScript/backend/tree/file-storage-tree-container.ts
- Build/eslintrc.json 3 additions, 1 deletionBuild/eslintrc.json
- typo3/sysext/backend/Resources/Public/JavaScript/page-tree/page-tree-element.js 1 addition, 1 deletion...esources/Public/JavaScript/page-tree/page-tree-element.js
- typo3/sysext/backend/Resources/Public/JavaScript/svg-tree.js 1 addition, 1 deletiontypo3/sysext/backend/Resources/Public/JavaScript/svg-tree.js
- typo3/sysext/backend/Resources/Public/JavaScript/tree/drag-drop.js 2 additions, 2 deletions...ext/backend/Resources/Public/JavaScript/tree/drag-drop.js
- typo3/sysext/backend/Resources/Public/JavaScript/tree/file-storage-tree-container.js 1 addition, 1 deletion...ces/Public/JavaScript/tree/file-storage-tree-container.js
Please register or sign in to comment