mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-26 02:23:43 +03:00
refactor: remove not-needed animations
This commit is contained in:
parent
ef1b2bd19e
commit
9ea672d921
|
@ -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 ]
|
||||
})
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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[];
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
@ -39,7 +38,6 @@ TestBed.initTestEnvironment(
|
|||
|
||||
beforeEach(function() {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [BrowserAnimationsModule],
|
||||
providers: [
|
||||
SpecManager,
|
||||
services.AppStateService,
|
||||
|
|
Loading…
Reference in New Issue
Block a user