rm abstact keyword and methods #36

Merged
glitch4347 merged 1 commits from bad-abstract-onmouseclick-#35 into main 8 months ago
  1. 6
      demo/demo_pod.ts
  2. 16
      src/index.ts

6
demo/demo_pod.ts

@ -51,12 +51,6 @@ class DemoPod extends ChartwerkPod<Serie, Options> {
.attr('d', this.lineGenerator); .attr('d', this.lineGenerator);
} }
onMouseMove(): void {}
onMouseOver(): void {}
onMouseOut(): void {}
onMouseClick(): void {}
renderSharedCrosshair(values): void {}
hideSharedCrosshair(): void {}
} }
export { DemoPod }; export { DemoPod };

16
src/index.ts

@ -37,7 +37,7 @@ import debounce from 'lodash/debounce';
const DEFAULT_TICK_SIZE = 2; const DEFAULT_TICK_SIZE = 2;
abstract class ChartwerkPod<T extends Serie, O extends Options> { class ChartwerkPod<T extends Serie, O extends Options> {
protected series: CoreSeries<T>; protected series: CoreSeries<T>;
protected options: CoreOptions<O>; protected options: CoreOptions<O>;
@ -151,13 +151,13 @@ abstract class ChartwerkPod<T extends Serie, O extends Options> {
this.series.updateSeries(newSeries); this.series.updateSeries(newSeries);
} }
protected abstract renderMetrics(): void; protected renderMetrics(): void {}
protected abstract onMouseOver(): void; protected onMouseOver(): void {}
protected abstract onMouseOut(): void; protected onMouseOut(): void {}
protected abstract onMouseMove(): void; protected onMouseMove(): void {}
protected abstract onMouseClick(): void; protected onMouseClick(): void { }
public abstract renderSharedCrosshair(values: { x?: number, y?: number }): void; public renderSharedCrosshair(values: { x?: number, y?: number }): void {}
public abstract hideSharedCrosshair(): void; public hideSharedCrosshair(): void {}
protected initPodState(): void { protected initPodState(): void {
const boxPararms = { const boxPararms = {

Loading…
Cancel
Save