Skip to content

Commit

Permalink
refactor: remove not-needed animations
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanHotsiy committed May 5, 2017
1 parent ef1b2bd commit 9ea672d
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 17 deletions.
3 changes: 1 addition & 2 deletions lib/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { RedocModule } from './redoc.module';
import { Redoc } from './components/index';

@NgModule({
imports: [ BrowserModule, BrowserAnimationsModule, RedocModule ],
imports: [ BrowserModule, RedocModule ],
bootstrap: [ Redoc ],
exports: [ Redoc ]
})
Expand Down
2 changes: 1 addition & 1 deletion lib/components/SideMenu/side-menu-items.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<polygon points="17.3 8.3 12 13.6 6.7 8.3 5.3 9.7 12 16.4 18.7 9.7 "/>
</svg>
</label>
<ul *ngIf="item.items" class="menu-subitems" [@itemAnimation]="(item.active || item.isGroup) ? 'expanded' : 'collapsed'">
<ul *ngIf="item.items" class="menu-subitems">
<side-menu-items [items]="item.items" (activate)="activateItem($event)"> </side-menu-items>
</ul>
</li>
11 changes: 0 additions & 11 deletions lib/components/SideMenu/side-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@ const global = window;
selector: 'side-menu-items',
templateUrl: './side-menu-items.html',
styleUrls: ['./side-menu-items.css'],
animations: [
trigger('itemAnimation', [
state('collapsed, void',
style({ height: '0px' })),
state('expanded',
style({ height: '*' })),
transition('collapsed <=> expanded', [
animate('200ms ease')
])
])
]
})
export class SideMenuItems {
@Input() items: MenuItem[];
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"author": "Roman Hotsiy",
"license": "MIT",
"devDependencies": {
"@angular/animations": "^4.0.0",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/compiler-cli": "^4.0.0",
Expand Down
2 changes: 0 additions & 2 deletions tests/spec-bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ var ErrorHandler = require('@angular/core').ErrorHandler;
var forwardRef = require('@angular/core').forwardRef;
var BrowserDynamicTestingModule = require('@angular/platform-browser-dynamic/testing').BrowserDynamicTestingModule;
var platformBrowserDynamicTesting = require('@angular/platform-browser-dynamic/testing').platformBrowserDynamicTesting;
var BrowserAnimationsModule = require('@angular/platform-browser/animations').BrowserAnimationsModule;
var SpecManager = require('../lib/utils/spec-manager').SpecManager;
var services = require('../lib/services/index');
var REDOC_PIPES = require('../lib/utils/pipes').REDOC_PIPES;
Expand All @@ -39,7 +38,6 @@ TestBed.initTestEnvironment(

beforeEach(function() {
TestBed.configureTestingModule({
imports: [BrowserAnimationsModule],
providers: [
SpecManager,
services.AppStateService,
Expand Down

0 comments on commit 9ea672d

Please sign in to comment.