WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit c3a7eee

Browse files
authored
Merge pull request #5765 from ag-grid/AG-16099/navigator_source
AG-16099 Emit 'user-interaction' source on navigator interactions
2 parents ba393b1 + 92335d2 commit c3a7eee

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

packages/ag-charts-community/src/chart/interaction/zoomManager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ export class ZoomManager extends BaseManager {
296296
const changes = this.toCoreZoomState(zoom);
297297
this.lastRestoredState = deepFreeze(deepClone(changes));
298298
this.updateChanges({
299-
source: 'user-interaction',
299+
source: 'initialState',
300300
sourceDetail: 'internal-restoreMemento',
301301
changes,
302302
isReset: false,

packages/ag-charts-enterprise/src/features/navigator/navigatorDOMProxy.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ export class NavigatorDOMProxy {
9393
const { _min: min, _max: max } = this;
9494
if (min == null || max == null) return;
9595

96-
this.ctx.zoomManager.updateZoom({ source: 'chart-update', sourceDetail: 'navigatorDOM' }, { x: { min, max } });
96+
this.ctx.zoomManager.updateZoom(
97+
{ source: 'user-interaction', sourceDetail: 'navigatorDOM' },
98+
{ x: { min, max } }
99+
);
97100
}
98101

99102
updateBounds(bounds: BoxBounds): void {

packages/ag-charts-types/src/chart/eventOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export interface AgAnnotationsEvent<TContext = ContextDefault> {
6464
context?: TContext;
6565
}
6666

67-
export type AgZoomEventSource = 'user-interaction' | 'chart-update' | 'data-update' | 'sync';
67+
export type AgZoomEventSource = 'user-interaction' | 'chart-update' | 'data-update' | 'sync' | 'initialState';
6868

6969
export interface AgZoomEvent<TContext = ContextDefault> {
7070
type: 'zoom';

0 commit comments

Comments
 (0)