Skip to content

Commit

Permalink
chart refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Oct 21, 2021
1 parent 6498db8 commit b2b142b
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 20 deletions.
4 changes: 2 additions & 2 deletions packages/eez-studio-ui/chart/ChartViewOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import type {
IChartsController,
WaveformRenderAlgorithm,
IChartController
} from "./chart";
} from "eez-studio-ui/chart/chart";

import { globalViewOptions } from "./GlobalViewOptions";
import { globalViewOptions } from "eez-studio-ui/chart/GlobalViewOptions";

////////////////////////////////////////////////////////////////////////////////

Expand Down
2 changes: 1 addition & 1 deletion packages/eez-studio-ui/chart/GlobalViewOptions.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { autorun, observable, runInAction, toJS } from "mobx";
import type { WaveformRenderAlgorithm } from "./chart";
import type { WaveformRenderAlgorithm } from "eez-studio-ui/chart/chart";

class GlobalViewOptions {
static LOCAL_STORAGE_ITEM_ID = "shared/ui/chart/globalViewOptions";
Expand Down
4 changes: 2 additions & 2 deletions packages/eez-studio-ui/chart/Measurement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import type {
IMeasurementDefinition,
ISingleInputMeasurementTaskSpecification,
IMultiInputMeasurementTaskSpecification
} from "./chart";
} from "eez-studio-ui/chart/chart";

import { initValuesAccesor } from "eez-studio-ui/chart/value-accesor";

import { clamp } from "./clamp";
import { clamp } from "eez-studio-ui/chart/clamp";

export class Measurement implements IMeasurement {
constructor(
Expand Down
4 changes: 2 additions & 2 deletions packages/eez-studio-ui/chart/WaveformLineView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
renderWaveformPath,
ILineController,
IWaveform
} from "./chart";
import { globalViewOptions } from "./GlobalViewOptions";
} from "eez-studio-ui/chart/chart";
import { globalViewOptions } from "eez-studio-ui/chart/GlobalViewOptions";

interface IWaveformLineController extends ILineController {
waveform: IWaveform;
Expand Down
19 changes: 11 additions & 8 deletions packages/eez-studio-ui/chart/chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,22 @@ import type {
IMeasurementFunction,
IMeasurementFunctionResultType
} from "eez-studio-shared/extensions/extension";
import { Measurement } from "./Measurement";
import { clamp } from "./clamp";
import { WaveformFormat } from "./WaveformFormat";
import type { IWaveformDlogParams } from "./IWaveformDlogParams";
import { WaveformLineView } from "./WaveformLineView";
import { ChartViewOptionsProps, ChartViewOptions } from "./ChartViewOptions";
import { globalViewOptions } from "./GlobalViewOptions";
import { Measurement } from "eez-studio-ui/chart/Measurement";
import { clamp } from "eez-studio-ui/chart/clamp";
import { WaveformFormat } from "eez-studio-ui/chart/WaveformFormat";
import type { IWaveformDlogParams } from "eez-studio-ui/chart/IWaveformDlogParams";
import { WaveformLineView } from "eez-studio-ui/chart/WaveformLineView";
import {
ChartViewOptionsProps,
ChartViewOptions
} from "eez-studio-ui/chart/ChartViewOptions";
import { globalViewOptions } from "eez-studio-ui/chart/GlobalViewOptions";
import {
IRulersController,
IRulersModel,
RulersController,
RulersDockView
} from "./rulers";
} from "eez-studio-ui/chart/rulers";

////////////////////////////////////////////////////////////////////////////////

Expand Down
4 changes: 2 additions & 2 deletions packages/eez-studio-ui/chart/rulers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import type {
IChartView,
ICursor,
MouseHandler
} from "./chart";
import { globalViewOptions } from "./GlobalViewOptions";
} from "eez-studio-ui/chart/chart";
import { globalViewOptions } from "eez-studio-ui/chart/GlobalViewOptions";

export interface IRulersController {
rulersModel: IRulersModel;
Expand Down
4 changes: 2 additions & 2 deletions packages/eez-studio-ui/chart/value-accesor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DataType } from "./DataType";
import type { IWaveformDlogParams } from "./IWaveformDlogParams";
import { WaveformFormat } from "./WaveformFormat";
import type { IWaveformDlogParams } from "eez-studio-ui/chart/IWaveformDlogParams";
import { WaveformFormat } from "eez-studio-ui/chart/WaveformFormat";

function getCsvValues(valuesArray: any) {
var values = new Buffer(valuesArray.buffer || []).toString("binary");
Expand Down
2 changes: 1 addition & 1 deletion packages/project-editor/project-editor-bootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ import { ConnectionLine, Flow } from "project-editor/flow/flow";
import { Action } from "project-editor/features/action/action";
import { ScpiCommand, ScpiSubsystem } from "project-editor/features/scpi/scpi";

import "project-editor/flow/components/instrument";
import "project-editor/flow/components/actions/instrument";

let extensionsInitialized = false;

Expand Down

0 comments on commit b2b142b

Please sign in to comment.