mirror of
https://github.com/Redocly/redoc.git
synced 2025-03-03 17:35:46 +03:00
Improved scrolling performance
This commit is contained in:
parent
9979fab0ab
commit
667af8f2e4
|
@ -5,6 +5,7 @@ import SchemaManager from '../../utils/SchemaManager';
|
|||
import ApiInfo from '../ApiInfo/api-info';
|
||||
import MethodsList from '../MethodsList/methods-list';
|
||||
import SideMenu from '../SideMenu/side-menu';
|
||||
import {ChangeDetectionStrategy} from 'angular2/angular2';
|
||||
|
||||
@RedocComponent({
|
||||
selector: 'redoc',
|
||||
|
@ -12,6 +13,7 @@ import SideMenu from '../SideMenu/side-menu';
|
|||
templateUrl: './lib/components/Redoc/redoc.html',
|
||||
styleUrls: ['./lib/components/Redoc/redoc.css'],
|
||||
directives: [ApiInfo, MethodsList, SideMenu]
|
||||
//changeDetection: ChangeDetectionStrategy.Default
|
||||
})
|
||||
export default class Redoc extends BaseComponent {
|
||||
constructor(schemaMgr) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import {RedocComponent, BaseComponent} from '../base';
|
||||
import SchemaManager from '../../utils/SchemaManager';
|
||||
import {NgZone} from 'angular2/angular2';
|
||||
import {NgZone, ChangeDetectionStrategy} from 'angular2/angular2';
|
||||
import {redocEvents} from '../../events';
|
||||
|
||||
const CHANGE = {
|
||||
|
@ -21,7 +21,8 @@ const INVIEW_POSITION = {
|
|||
selector: 'side-menu',
|
||||
providers: [SchemaManager],
|
||||
templateUrl: './lib/components/SideMenu/side-menu.html',
|
||||
styleUrls: ['./lib/components/SideMenu/side-menu.css']
|
||||
styleUrls: ['./lib/components/SideMenu/side-menu.css'],
|
||||
changeDetection: ChangeDetectionStrategy.Default
|
||||
})
|
||||
export default class SideMenu extends BaseComponent {
|
||||
constructor(schemaMgr, zone) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
import {Component, View, OnInit, CORE_DIRECTIVES} from 'angular2/angular2';
|
||||
import {Component, View, OnInit, CORE_DIRECTIVES, ChangeDetectionStrategy} from 'angular2/angular2';
|
||||
import SchemaManager from '../utils/SchemaManager';
|
||||
import JsonPointer from '../utils/JsonPointer';
|
||||
import {MarkedPipe, JsonPointerEscapePipe} from '../utils/pipes';
|
||||
|
@ -41,7 +41,8 @@ export function RedocComponent(options) {
|
|||
inputs: inputs,
|
||||
outputs: options.outputs,
|
||||
lifecycle: [OnInit],
|
||||
providers: options.providers
|
||||
providers: options.providers,
|
||||
changeDetection: options.changeDetection || ChangeDetectionStrategy.Detached
|
||||
});
|
||||
let viewDecorator = View({
|
||||
templateUrl: options.templateUrl,
|
||||
|
|
Loading…
Reference in New Issue
Block a user