Page MenuHomec4science

text-view-component.component.ts
No OneTemporary

File Metadata

Created
Sun, Apr 28, 16:29

text-view-component.component.ts

import {Component, OnChanges, OnInit} from '@angular/core';
import textViewSettings from './text-view-settings.json';
import { GenericControlElementsService, SelectionBundle
} from '../generic-control-elements-component/generic-control-elements-service.service';
@Component({
selector: 'app-text-view-component',
templateUrl: './text-view-component.component.html',
styleUrls: ['./text-view-component.component.scss'],
})
export class TextViewComponentComponent implements OnInit {
routeImage: any = {};
routes = '';
options = JSON.parse(JSON.stringify(textViewSettings));
// the actual settings
actualSettings?: SelectionBundle;
// in case there is no settings input
constructor( private optionService: GenericControlElementsService ) { }
image = { height: 973.91998, width: 2038.5601, file_name: "../assets/W-II-1,131et132.jpg" };
text_field = { left: 358.805, top: 78.051, width: 662.761, height: 831.879 };
manuscript = { title: 'W II 1',
pages: [
{ number: '131',
metadata: [
{ head: { description: 'Stellenkommentar'}, content: [ { reference: '2', quote: 'Leben Thomas Carlyle’s', text: 'vgl. Froude, Das Leben Thomas Carlyles'} ]},
{ head: { description: 'Druckorte' }, content: [ { reference: '24-34', text: 'KGW VIII 9[11]'}, { reference: '34-40', text:'KGW VIII 9[12]'} ]}
]
}
]
};
ngOnInit() {
this.routeImage = this.getImage(this.routes);
this.optionService.selectionEvent.subscribe(newSettings => {
this.actualSettings = newSettings;
console.log('neue textviewsettings', this.actualSettings);
});
}
getImage(routes) {
return { height: 973.91998, width: 2038.5601, file_name: "../assets/W-II-1,131et132.jpg" };
}
}

Event Timeline