Skip to content

Commit c4bfb34

Browse files
committed
[FIX] spreadsheet: fix zoomable chart cursor
Commit Description These changes aims to fix some bad behaviors with the cursor for the zoomable chart, caused by the onOdooChartItemHover method and the odoo menu link for the Odoo chart. This fix removes the onHover and onClick options for the master chart in zoomable chart, and add an early return for the menu link plugin in case of no menu or no dashboard mode. Related Task closes #8013 Task: 5012198 Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
1 parent 90cb91a commit c4bfb34

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/components/figures/chart/chartJs/zoomable_chart/zoomable_chartjs.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ export class ZoomableChartJsComponent extends ChartJsComponent {
455455
}
456456
this.updateAxisLimits(min, max);
457457
this.mode = undefined;
458+
this.updateMasterChartCursor(ev);
458459
};
459460
this.removeEventListeners = () => {
460461
window.removeEventListener("pointermove", onMasterChartDrag, true);
@@ -465,7 +466,7 @@ export class ZoomableChartJsComponent extends ChartJsComponent {
465466
window.addEventListener("pointerup", onMasterChartPointerUp, true);
466467
}
467468

468-
onMasterChartPointerMove(ev: PointerEvent) {
469+
updateMasterChartCursor(ev: PointerEvent) {
469470
const { offsetX: x, offsetY: y, target } = ev;
470471
if (!target || !this.isMasterChartAllowed) {
471472
return;

src/components/figures/chart/chartJs/zoomable_chart/zoomable_chartjs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
t-ref="masterChartCanvas"
1414
t-on-dblclick="onMasterChartDoubleClick"
1515
t-on-pointerdown="onMasterChartPointerDown"
16-
t-on-pointermove="onMasterChartPointerMove"
16+
t-on-pointermove="updateMasterChartCursor"
1717
t-on-mouseleave="onMasterChartMouseLeave"
1818
/>
1919
</div>

0 commit comments

Comments
 (0)