feat: optimize range select in HeaderHighlightPlugin

This commit is contained in:
Rui-Sun 2024-11-19 11:55:36 +08:00
parent aeef53e02f
commit 6d3e29c0d3
3 changed files with 16 additions and 4 deletions

View File

@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@visactor/vtable",
"comment": "feat: optimize range select in HeaderHighlightPlugin",
"type": "none"
}
],
"packageName": "@visactor/vtable"
}

View File

@ -155,10 +155,6 @@ export class CustomCellStylePlugin {
this.table.scenegraph.updateCellContent(cellPos.col, cellPos.row);
}
if (!customStyleId) {
// remove from customCellStyleArrangement array
this.customCellStyleArrangement.splice(index, 1);
}
this.table.scenegraph.updateNextFrame();
}

View File

@ -43,6 +43,12 @@ export class HeaderHighlightPlugin {
this.table.on('selected_clear', () => {
this.clearHighlight();
});
this.table.on('mousemove_table', () => {
if (this.table.stateManager.select.selecting) {
this.updateHighlight();
}
});
}
clearHighlight() {