From f066dfcddf11ca92735247e41fb87f3da0ac43d0 Mon Sep 17 00:00:00 2001 From: cocopon Date: Sun, 14 Mar 2021 05:46:25 +0900 Subject: [PATCH] Fix importing paths --- src/constraint/interval.ts | 3 ++- src/controller/range-slider-text.ts | 8 ++++++-- src/controller/range-slider.ts | 2 +- src/converter/interval.ts | 3 ++- src/plugin.ts | 11 ++++++----- src/view/range-slider-text.ts | 2 +- src/view/range-slider.ts | 3 ++- 7 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/constraint/interval.ts b/src/constraint/interval.ts index b635e65..f530e23 100644 --- a/src/constraint/interval.ts +++ b/src/constraint/interval.ts @@ -1,6 +1,7 @@ -import {Interval} from 'model/interval'; import {Constraint} from 'tweakpane/lib/plugin/common/constraint/constraint'; +import {Interval} from '../model/interval'; + export class IntervalConstraint implements Constraint { public readonly edge: Constraint | undefined; diff --git a/src/controller/range-slider-text.ts b/src/controller/range-slider-text.ts index 2839eca..e4831c3 100644 --- a/src/controller/range-slider-text.ts +++ b/src/controller/range-slider-text.ts @@ -1,10 +1,10 @@ -import {Interval, IntervalAssembly} from 'model/interval'; import {ValueController} from 'tweakpane/lib/plugin/common/controller/value'; import {Formatter} from 'tweakpane/lib/plugin/common/converter/formatter'; import {Parser} from 'tweakpane/lib/plugin/common/converter/parser'; import {Value} from 'tweakpane/lib/plugin/common/model/value'; -import {RangeSliderTextView} from 'view/range-slider-text'; +import {Interval, IntervalAssembly} from '../model/interval'; +import {RangeSliderTextView} from '../view/range-slider-text'; import {PointNdTextControllerMod} from './point-nd-mod'; import {RangeSliderController} from './range-slider'; @@ -46,4 +46,8 @@ export class RangeSliderTextController implements ValueController { textView: this.tc_.view, }); } + + public get textController(): PointNdTextControllerMod { + return this.tc_; + } } diff --git a/src/controller/range-slider.ts b/src/controller/range-slider.ts index 3a287ca..3447511 100644 --- a/src/controller/range-slider.ts +++ b/src/controller/range-slider.ts @@ -1,4 +1,3 @@ -import {Interval} from 'model/interval'; import {ValueController} from 'tweakpane/lib/plugin/common/controller/value'; import {Value} from 'tweakpane/lib/plugin/common/model/value'; import {mapRange} from 'tweakpane/lib/plugin/common/number-util'; @@ -8,6 +7,7 @@ import { PointerHandlerEvent, } from 'tweakpane/lib/plugin/common/view/pointer-handler'; +import {Interval} from '../model/interval'; import {RangeSliderView} from '../view/range-slider'; interface Config { diff --git a/src/converter/interval.ts b/src/converter/interval.ts index 4dae709..d6722ed 100644 --- a/src/converter/interval.ts +++ b/src/converter/interval.ts @@ -1,6 +1,7 @@ -import {Interval} from 'model/interval'; import {BindingTarget} from 'tweakpane/lib/plugin/common/binding/target'; +import {Interval} from '../model/interval'; + export function intervalFromUnknown(value: unknown): Interval { return Interval.isObject(value) ? new Interval(value.min, value.max) diff --git a/src/plugin.ts b/src/plugin.ts index f515b74..3003c77 100644 --- a/src/plugin.ts +++ b/src/plugin.ts @@ -1,8 +1,3 @@ -import {IntervalConstraint} from 'constraint/interval'; -import {PointNdTextControllerMod} from 'controller/point-nd-mod'; -import {RangeSliderTextController} from 'controller/range-slider-text'; -import {intervalFromUnknown, writeInterval} from 'converter/interval'; -import {Interval, IntervalAssembly, IntervalObject} from 'model/interval'; import { CompositeConstraint, findConstraint, @@ -26,6 +21,12 @@ import { getSuitableDraggingScale, } from 'tweakpane/lib/plugin/util'; +import {IntervalConstraint} from './constraint/interval'; +import {PointNdTextControllerMod} from './controller/point-nd-mod'; +import {RangeSliderTextController} from './controller/range-slider-text'; +import {intervalFromUnknown, writeInterval} from './converter/interval'; +import {Interval, IntervalAssembly, IntervalObject} from './model/interval'; + interface IntervalInputParams { max?: number; min?: number; diff --git a/src/view/range-slider-text.ts b/src/view/range-slider-text.ts index 62f9a1c..0d76216 100644 --- a/src/view/range-slider-text.ts +++ b/src/view/range-slider-text.ts @@ -1,9 +1,9 @@ -import {Interval} from 'model/interval'; import {Value} from 'tweakpane/lib/plugin/common/model/value'; import {ClassName} from 'tweakpane/lib/plugin/common/view/class-name'; import {ValueView} from 'tweakpane/lib/plugin/common/view/value'; import {PointNdTextView} from 'tweakpane/lib/plugin/input-bindings/common/view/point-nd-text'; +import {Interval} from '../model/interval'; import {RangeSliderView} from './range-slider'; interface Config { diff --git a/src/view/range-slider.ts b/src/view/range-slider.ts index 30b1c15..78aba0c 100644 --- a/src/view/range-slider.ts +++ b/src/view/range-slider.ts @@ -1,4 +1,3 @@ -import {Interval} from 'model/interval'; import {Value} from 'tweakpane/lib/plugin/common/model/value'; import { constrainRange, @@ -7,6 +6,8 @@ import { import {ClassName} from 'tweakpane/lib/plugin/common/view/class-name'; import {ValueView} from 'tweakpane/lib/plugin/common/view/value'; +import {Interval} from '../model/interval'; + interface Config { maxValue: number; minValue: number;