Skip to content

Commit

Permalink
fix some circular deps
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjlockwood committed Aug 28, 2017
1 parent 47698b6 commit 4a19967
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 18 deletions.
3 changes: 2 additions & 1 deletion src/app/model/paths/Path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Matrix, Point } from 'app/scripts/common';
import { environment } from 'environments/environment';
import * as _ from 'lodash';

import { Command, HitOptions, HitResult, Line, Projection, ProjectionOntoPath } from '.';
import { Line, Projection } from './calculators';
import { Command } from './Command';
import { PathMutator } from './PathMutator';
import * as PathParser from './PathParser';
import { PathState } from './PathState';
Expand Down
4 changes: 3 additions & 1 deletion src/app/model/paths/PathMutator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ import { MathUtil, Matrix, Point } from 'app/scripts/common';
import { environment } from 'environments/environment';
import * as _ from 'lodash';

import { Command, Path, SvgChar } from '.';
import { Command } from './Command';
import { CommandState } from './CommandState';
import { Path } from './Path';
import { PathState } from './PathState';
import { SubPathState, SubPathStateMutator, flattenSubPathStates } from './SubPathState';
import { SvgChar } from './SvgChar';

const ENABLE_LOGS = !environment.production && false;

Expand Down
3 changes: 2 additions & 1 deletion src/app/model/paths/PathUtil.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { MathUtil, Point } from 'app/scripts/common';

import { Command, Path } from '.';
import { Command } from './Command';
import { Path } from './Path';

/**
* Interpolates between a start and end path using the specified fraction.
Expand Down
2 changes: 1 addition & 1 deletion src/app/model/timeline/Animation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Inspectable, NameProperty, NumberProperty, Property } from 'app/model/properties';
import * as _ from 'lodash';

import { AnimationBlock } from '.';
import { AnimationBlock } from './AnimationBlock';

/**
* An animation represents a collection of layer property tweens for a VectorLayer.
Expand Down
3 changes: 2 additions & 1 deletion src/app/scripts/common/MathUtil.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as _ from 'lodash';

import { Matrix, Point } from '.';
import { Matrix } from './Matrix';
import { Point } from './Point';

/** Returns the floor modulus of the integer argument. */
export function floorMod(num: number, maxNum: number) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/scripts/common/Matrix.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MathUtil } from '.';
import * as MathUtil from './MathUtil';

/**
* An immutable Matrix class that uses the standard SVG transformation
Expand Down
4 changes: 4 additions & 0 deletions src/app/scripts/common/Point.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface Point {
readonly x: number;
readonly y: number;
}
6 changes: 6 additions & 0 deletions src/app/scripts/common/Rect.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export interface Rect {
readonly l: number;
readonly t: number;
readonly r: number;
readonly b: number;
}
14 changes: 2 additions & 12 deletions src/app/scripts/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,5 @@ import * as MathUtil from './MathUtil';
import * as ModelUtil from './ModelUtil';
export * from './Matrix';
export { ColorUtil, MathUtil, ModelUtil };

export interface Point {
readonly x: number;
readonly y: number;
}

export interface Rect {
readonly l: number;
readonly t: number;
readonly r: number;
readonly b: number;
}
export { Point } from './Point';
export { Rect } from './Rect';

0 comments on commit 4a19967

Please sign in to comment.