Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91950623
zoom.pipe.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Nov 16, 01:32
Size
405 B
Mime Type
text/x-java
Expires
Mon, Nov 18, 01:32 (2 d)
Engine
blob
Format
Raw Data
Handle
22352782
Attached To
rNIETZSCHEBETAAPP Nietzsche-Beta-App
zoom.pipe.ts
View Options
import { Pipe, PipeTransform } from '@angular/core';
interface ZoomObject {
zoomFactor: number;
changeValue: number;
}
@Pipe({
name: 'zoomTitle'
})
export class ZoomPipe implements PipeTransform {
transform(zoom: ZoomObject): string {
return (zoom.zoomFactor+zoom.changeValue < 0) ? Math.round(zoom.zoomFactor*50) + '%' : Math.round((zoom.zoomFactor+zoom.changeValue)*100) + '%';
}
}
Event Timeline
Log In to Comment