center the container always based on the width&height of the image (#7027)

This commit is contained in:
Urse Daniel
2021-05-14 15:43:33 +03:00
committed by GitHub
parent 251b64a8f3
commit 11b66338d0
2 changed files with 22 additions and 15 deletions

View File

@@ -319,7 +319,9 @@ describe('Test Img viewer component ', () => {
component.isEditing = true;
spyOn(component, 'reset').and.callThrough();
spyOn(component, 'updateCanvasContainer');
spyOn(component.cropper, 'reset');
spyOn(component.cropper, 'clear');
spyOn(component.cropper, 'zoomTo');
fixture.detectChanges();
@@ -331,7 +333,8 @@ describe('Test Img viewer component ', () => {
expect(component.scale).toEqual(1.0);
expect(component.isEditing).toEqual(false);
expect(component.cropper.reset).toHaveBeenCalled();
expect(component.cropper.zoomTo).toHaveBeenCalledWith(component.scale);
expect(component.cropper.clear).toHaveBeenCalled();
expect(component.updateCanvasContainer).toHaveBeenCalled();
}));
it('should save when clicked on toolbar button', fakeAsync(() => {