diff --git a/docs/core/components/viewer.component.md b/docs/core/components/viewer.component.md index 83bd0b9ccf..05c9b9e40c 100644 --- a/docs/core/components/viewer.component.md +++ b/docs/core/components/viewer.component.md @@ -75,6 +75,7 @@ See the [Custom layout](#custom-layout) section for full details of all availabl | originalMimeType | `string` | | Overload originalMimeType | | overlayMode | `boolean` | false | If `true` then show the Viewer as a full page over the current content. Otherwise fit inside the parent div. | | readOnly | `boolean` | true | Enable when where is possible the editing functionalities | +| allowedEditActions | `{ [key: string]: boolean }` | `{ rotate: true, crop: true }` | Controls which editing actions are enabled when not in read-only mode. Allows granular control over actions like rotation and cropping. | | showLeftSidebar | `boolean` | false | Toggles left sidebar visibility. Requires `allowLeftSidebar` to be set to `true`. | | showRightSidebar | `boolean` | false | Toggles right sidebar visibility. Requires `allowRightSidebar` to be set to `true`. | | showToolbar | `boolean` | true | Hide or show the toolbar | diff --git a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.html b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.html index 62b61b0233..0aa3b92ae4 100644 --- a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.html +++ b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.html @@ -24,6 +24,7 @@ [urlFile]="urlFileContent" [tracks]="tracks" [readOnly]="readOnly" + [allowedEditActions]="allowedEditActions" [viewerExtensions]="viewerExtensions" (downloadFile)="onDownloadFile()" (navigateBefore)="onNavigateBeforeClick($event)" diff --git a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts index 9ac2dcf2db..ec9fd7c415 100644 --- a/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts +++ b/lib/content-services/src/lib/viewer/components/alfresco-viewer.component.ts @@ -215,6 +215,10 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy { nodeEntry: NodeEntry; tracks: Track[] = []; readOnly: boolean = true; + allowedEditActions: { [key: string]: boolean } = { + rotate: true, + crop: true + }; sidebarRightTemplateContext: { node: Node } = { node: null }; sidebarLeftTemplateContext: { node: Node } = { node: null }; diff --git a/lib/core/src/lib/viewer/components/img-viewer/img-viewer.component.html b/lib/core/src/lib/viewer/components/img-viewer/img-viewer.component.html index b8e26b1412..3ce26e9a02 100644 --- a/lib/core/src/lib/viewer/components/img-viewer/img-viewer.component.html +++ b/lib/core/src/lib/viewer/components/img-viewer/img-viewer.component.html @@ -33,14 +33,14 @@ zoom_in - -