Skip to content

Commit 024a66a

Browse files
committed
fix: ensure we have listeners
1 parent d7f5b94 commit 024a66a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/charting/listener/BarLineChartTouchListener.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,9 @@ export class BarLineChartTouchListener extends ChartTouchListener<BarLineChartBa
450450
distanceY = -distanceY;
451451
}
452452
this.mMatrix.postTranslate(distanceX, distanceY);
453-
this.mChart.notify({ eventName: 'translate', object: this.mChart, distanceX, distanceY });
453+
if (this.mChart.hasListeners('translate')) {
454+
this.mChart.notify({ eventName: 'translate', object: this.mChart, distanceX, distanceY });
455+
}
454456
}
455457

456458
/**

0 commit comments

Comments
 (0)