mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-29 12:03:44 +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 { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
||||||
|
|
||||||
import { RedocModule } from './redoc.module';
|
import { RedocModule } from './redoc.module';
|
||||||
import { Redoc } from './components/index';
|
import { Redoc } from './components/index';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [ BrowserModule, BrowserAnimationsModule, RedocModule ],
|
imports: [ BrowserModule, RedocModule ],
|
||||||
bootstrap: [ Redoc ],
|
bootstrap: [ Redoc ],
|
||||||
exports: [ 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 "/>
|
<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>
|
</svg>
|
||||||
</label>
|
</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>
|
<side-menu-items [items]="item.items" (activate)="activateItem($event)"> </side-menu-items>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -22,17 +22,6 @@ const global = window;
|
||||||
selector: 'side-menu-items',
|
selector: 'side-menu-items',
|
||||||
templateUrl: './side-menu-items.html',
|
templateUrl: './side-menu-items.html',
|
||||||
styleUrls: ['./side-menu-items.css'],
|
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 {
|
export class SideMenuItems {
|
||||||
@Input() items: MenuItem[];
|
@Input() items: MenuItem[];
|
||||||
|
|
|
@ -50,7 +50,6 @@
|
||||||
"author": "Roman Hotsiy",
|
"author": "Roman Hotsiy",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular/animations": "^4.0.0",
|
|
||||||
"@angular/common": "^4.0.0",
|
"@angular/common": "^4.0.0",
|
||||||
"@angular/compiler": "^4.0.0",
|
"@angular/compiler": "^4.0.0",
|
||||||
"@angular/compiler-cli": "^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 forwardRef = require('@angular/core').forwardRef;
|
||||||
var BrowserDynamicTestingModule = require('@angular/platform-browser-dynamic/testing').BrowserDynamicTestingModule;
|
var BrowserDynamicTestingModule = require('@angular/platform-browser-dynamic/testing').BrowserDynamicTestingModule;
|
||||||
var platformBrowserDynamicTesting = require('@angular/platform-browser-dynamic/testing').platformBrowserDynamicTesting;
|
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 SpecManager = require('../lib/utils/spec-manager').SpecManager;
|
||||||
var services = require('../lib/services/index');
|
var services = require('../lib/services/index');
|
||||||
var REDOC_PIPES = require('../lib/utils/pipes').REDOC_PIPES;
|
var REDOC_PIPES = require('../lib/utils/pipes').REDOC_PIPES;
|
||||||
|
@ -39,7 +38,6 @@ TestBed.initTestEnvironment(
|
||||||
|
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [BrowserAnimationsModule],
|
|
||||||
providers: [
|
providers: [
|
||||||
SpecManager,
|
SpecManager,
|
||||||
services.AppStateService,
|
services.AppStateService,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user