mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[ADF-4387] Configuration option to change the dafault viewer zoom (#4645)
* [ADF-4387] Configuration option to change the dafault viewer zoom
This commit is contained in:
committed by
Eugenio Romano
parent
d52671823e
commit
a6552dbb17
@@ -15,8 +15,18 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { Component, Input, OnChanges, SimpleChanges, ViewEncapsulation, ElementRef, OnInit, OnDestroy } from '@angular/core';
|
||||
import {
|
||||
Component,
|
||||
Input,
|
||||
OnChanges,
|
||||
SimpleChanges,
|
||||
ViewEncapsulation,
|
||||
ElementRef,
|
||||
OnInit,
|
||||
OnDestroy
|
||||
} from '@angular/core';
|
||||
import { ContentService } from '../../services/content.service';
|
||||
import { AppConfigService } from './../../app-config/app-config.service';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-img-viewer',
|
||||
@@ -60,8 +70,18 @@ export class ImgViewerComponent implements OnInit, OnChanges, OnDestroy {
|
||||
private element: HTMLElement;
|
||||
|
||||
constructor(
|
||||
private appConfigService: AppConfigService,
|
||||
private contentService: ContentService,
|
||||
private el: ElementRef) {
|
||||
this.initializeScaling();
|
||||
}
|
||||
|
||||
initializeScaling() {
|
||||
const scaling = this.appConfigService.get<number>('adf-viewer.image-viewer-scaling', undefined) / 100;
|
||||
if (scaling) {
|
||||
this.scaleX = scaling;
|
||||
this.scaleY = scaling;
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
Reference in New Issue
Block a user