bad logic of events calls #43

Open
opened 1 month ago by glitch4347 · 0 comments
Owner

It's weird thast you have in core options with callbacks and protected methods like

protected onMouseOver(): void {}
  protected onMouseOut(): void {}
  protected onMouseMove(): void {}
  protected onMouseClick(): void { }

and this methods not actually called in core logic. In other hand, this callbacks called in line-pod like

override onMouseMove(): void {
    const obj = this.getMouseObj();
    const eventX = d3.mouse(this.chartContainer.node())[0];
    const eventY = d3.mouse(this.chartContainer.node())[1];

    this.moveCrosshairLine(eventX, eventY);

    // TODO: is shift key pressed
    // TODO: need to refactor this object
    this.options.callbackMouseMove(obj); // real call of callback from options
}

so logic breaks when you say that you have callback in options, but this callback newver called in core

It's weird thast you have in core options with callbacks and protected methods like ``` protected onMouseOver(): void {} protected onMouseOut(): void {} protected onMouseMove(): void {} protected onMouseClick(): void { } ``` and this methods not actually called in core logic. In other hand, this callbacks called in line-pod like ``` override onMouseMove(): void { const obj = this.getMouseObj(); const eventX = d3.mouse(this.chartContainer.node())[0]; const eventY = d3.mouse(this.chartContainer.node())[1]; this.moveCrosshairLine(eventX, eventY); // TODO: is shift key pressed // TODO: need to refactor this object this.options.callbackMouseMove(obj); // real call of callback from options } ``` so logic breaks when you say that you have callback in options, but this callback newver called in core
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.