mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5378] ADF Previewer: Image Rotate + Save (#6958)
* updates including cropperJS * update on rotation + unit tests * small fix * hide toolbar on save * remove unused & duplicate method * added readonly & prettier code * include readOnly mode to hide/show media management actions * updated dependencies * fix emit spy * ADF-5378: Fix failing e2es * Fix comments for unit tests * ADF-5378: Removed obsolete buttons from e2e Co-authored-by: kristian <kristian.dimitrov@alfresco.com> Co-authored-by: adomi <ardit.domi@alfresco.com>
This commit is contained in:
@@ -97,6 +97,10 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
@Input()
|
||||
showToolbar = true;
|
||||
|
||||
/** Hide or show media management actions for image-viewer component */
|
||||
@Input()
|
||||
readOnly = true;
|
||||
|
||||
/** Specifies the name of the file when it is not available from the URL. */
|
||||
@Input()
|
||||
displayName: string;
|
||||
@@ -206,6 +210,10 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
@Output()
|
||||
invalidSharedLink = new EventEmitter();
|
||||
|
||||
/** Emitted when user updates a node via rotate, crop, etc. */
|
||||
@Output()
|
||||
fileSubmit = new EventEmitter<Blob>();
|
||||
|
||||
TRY_TIMEOUT: number = 10000;
|
||||
|
||||
viewerType = 'unknown';
|
||||
@@ -685,6 +693,10 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
|
||||
}
|
||||
|
||||
onSubmitFile(newImageBlob: Blob) {
|
||||
this.fileSubmit.emit(newImageBlob);
|
||||
}
|
||||
|
||||
onUnsupportedFile() {
|
||||
this.viewerType = 'unknown';
|
||||
}
|
||||
|
Reference in New Issue
Block a user