Posted 21 April 2021, 8:22 am EST - Updated 3 October 2022, 2:04 pm EST
Angular wijmo flex sheet auto fill draggable area
Posted by: m.mironenko on 21 April 2021, 8:22 am EST
-
-
Posted 23 April 2021, 2:54 am EST
Hi,
You may handle the mousemove event and set the cursor to crosshair to extend the dragfill trigger area. You may refer to the followng code snippet and the sample demonstrating the same:
flexsheet.hostElement.addEventListener("mousemove", (e) => { let htInfo = flexsheet.hitTest(e); if ( !htInfo || !htInfo.panel || htInfo.panel.cellType !== wjGrid.CellType.Cell ) { return; } // is selection if (!flexsheet.selection.contains(htInfo.row, htInfo.col)) { return; } // is cell the bottom-right cell in selection if ( flexsheet.selection.rightCol !== htInfo.col || flexsheet.selection.bottomRow !== htInfo.row ) { return; } // check edge let pt = htInfo.point; let cellRect = flexsheet.cells.getCellBoundingRect( htInfo.row, htInfo.col ); if (pt.x < cellRect.right - 16 || pt.y < cellRect.bottom - 16) { return; } flexsheet.hostElement.style.cursor = "crosshair"; });
https://codesandbox.io/s/wijmo-angular-forked-xp6hi?file=/src/app/app.component.ts
~sharad
-
Posted 23 April 2021, 8:40 am EST
It works! Many thanks for the quick reply