Merge pull request #2779 from VisActor/2764-bug-legend-scrolling-conflicts-with-table
Some checks are pending
Unit test CI / build (18.x) (push) Waiting to run

2764 bug legend scrolling conflicts with table
This commit is contained in:
方帅 2024-11-07 19:10:07 +08:00 committed by GitHub
commit 32d75c26f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 5 deletions

View File

@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: legend problems #2764 #2755\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "892739385@qq.com"
}

View File

@ -63,8 +63,8 @@ export class DiscreteTableLegend {
}
this.legendComponent.setAttributes({
width: this.table.tableNoFrameWidth,
height: this.table.tableNoFrameHeight
maxWidth: this.table.tableNoFrameWidth,
maxHeight: this.table.tableNoFrameHeight
});
this.adjustTableSize(this.legendComponent.attribute);

View File

@ -1049,9 +1049,12 @@ export function bindTableGroupListener(eventManager: EventManager) {
table.scenegraph.updateNextFrame();
});
table.scenegraph.stage.addEventListener('wheel', (e: FederatedWheelEvent) => {
table.editorManager?.completeEdit();
if (table.eventManager._enableTableScroll) {
handleWhell(e, stateManager);
const tableGroup: any = e.path.find(node => (node as any).role === 'table');
if (tableGroup) {
table.editorManager?.completeEdit();
if (table.eventManager._enableTableScroll) {
handleWhell(e, stateManager);
}
}
});
}