Skip to content

Commit

Permalink
upgraded to angular4, removed ThrowDirections
Browse files Browse the repository at this point in the history
ThrowDirections and Directions were not configured properly so just have Directions as exported by the swing library
  • Loading branch information
mashhoodr committed Mar 29, 2017
1 parent aa951c2 commit e46f7e6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 15 deletions.
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
"swing": "^4.2.0"
},
"devDependencies": {
"@angular/common": "^2.0.2",
"@angular/core": "^2.0.2",
"angular-cli": "^1.0.0-beta.17",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/cli": "1.0.0",
"@angular/compiler-cli": "^4.0.0",
"core-js": "^2.4.1",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.12",
"zone.js": "^0.6.23"
"zone.js": "^0.8.4"
}
}
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
export { SwingStackComponent } from './swing-stack-component';
export { SwingCardComponent } from './swing-card-component';
export {
ThrowDirection,
ThrowEvent,
DragEvent,
ThrowEventName,
Expand Down
2 changes: 1 addition & 1 deletion src/swing-stack-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ declare var require: any;
import {Component, Input, ContentChildren, QueryList,
AfterContentInit, EventEmitter } from '@angular/core';

import { ThrowDirection, ThrowEvent, DragEvent, Stack, Card, StackConfig} from './swing';
import { Direction, ThrowEvent, DragEvent, Stack, Card, StackConfig } from './swing';
import {SwingCardComponent} from './swing-card-component';

const Swing = require('swing');
Expand Down
11 changes: 2 additions & 9 deletions src/swing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@
declare var require: any;
const Swing = require('swing');

export enum ThrowDirection {
LEFT = -1,
RIGHT = 1,
UP = 2,
DOWN = 3
}

export interface ThrowEvent {
/**
* The element being dragged.
Expand All @@ -21,7 +14,7 @@ export interface ThrowEvent {
* The direction in which the element is being dragged: Card.DIRECTION_LEFT
* or Card.DIRECTION_RIGHT
*/
throwDirection: ThrowDirection;
throwDirection: Direction;
}

export interface DragEvent {
Expand All @@ -37,7 +30,7 @@ export interface DragEvent {
/**
* Only available when the event is dragmove
*/
throwDirection?: ThrowDirection;
throwDirection?: Direction;
/**
* Only available when the event is dragmove
*/
Expand Down

0 comments on commit e46f7e6

Please sign in to comment.