Browse Source

Codestyle fixes

master
rozetko 6 years ago
parent
commit
35ce72c6a6
  1. 1
      src/panel/graph_panel/graph_ctrl.ts
  2. 7
      src/panel/graph_panel/graph_renderer.ts
  3. 2
      src/panel/graph_panel/models/segment_array.ts

1
src/panel/graph_panel/graph_ctrl.ts

@ -35,7 +35,6 @@ class GraphCtrl extends MetricsPanelCtrl {
private _datasourceRequest: DatasourceRequest;
private _datasources: any;
private _panelPath: any;
private _renderError: boolean = false;
// annotationsPromise: any;

7
src/panel/graph_panel/graph_renderer.ts

@ -140,8 +140,8 @@ export class GraphRenderer {
if(this._isHasticEvent(selectionEvent)) {
this.plot.clearSelection();
var id = this._analyticController.getNewTempSegmentId();
var segment = new Segment(
const id = this._analyticController.getNewTempSegmentId();
const segment = new Segment(
id,
Math.round(selectionEvent.xaxis.from),
Math.round(selectionEvent.xaxis.to)
@ -150,8 +150,9 @@ export class GraphRenderer {
this._analyticController.deleteLabelingAnalyticUnitSegmentsInRange(
segment.from, segment.to
);
this._analyticController.addLabelSegment(segment, true);
} else {
this._analyticController.addLabelSegment(segment);
this._analyticController.addLabelSegment(segment, false);
}
this.renderPanel();

2
src/panel/graph_panel/models/segment_array.ts

@ -47,7 +47,7 @@ export class SegmentArray<T extends Segment> implements SegmentsSet<T> {
findSegments(point: number, rangeDist: number): T[] {
return this._segments.filter(s => {
var expanded = s.expandDist(rangeDist, 0.01);
const expanded = s.expandDist(rangeDist, 0.01);
return (expanded.from <= point) && (point <= expanded.to);
});
}

Loading…
Cancel
Save