Project

General

Profile

Bug #103879 » fix_image_maniplation_in_v12.patch

Stephan Gruber, 2024-06-06 22:11

View differences:

Build/Sources/TypeScript/backend/image-manipulation.ts (revision 889b486ee93ea444ba237b54f574c7db061827af) → Build/Sources/TypeScript/backend/image-manipulation.ts (date 1716210720899)
);
const variant: CropVariant = Object.assign({}, this.data[cropVariantId], { cropArea });
this.updatePreviewThumbnail(variant, elem);
this.currentModal.querySelector(`#${variant.id}`)?.querySelector(`[data-bs-option="${variant.selectedRatio}"]`)?.classList.add('active')
});
this.currentCropVariant.cropArea = this.convertRelativeToAbsoluteCropArea(
......
private update(cropVariant: CropVariant): void {
const temp: CropVariant = Object.assign({}, cropVariant);
const selectedRatio: Ratio = cropVariant.allowedAspectRatios[cropVariant.selectedRatio];
this.currentModal.querySelector('[data-bs-option].active')?.classList.remove('active');
this.currentModal.querySelector(`[data-bs-option="${cropVariant.selectedRatio}"]`)?.classList.add('active');
// highlight the currently selected ratio of the active cropping variant
this.currentModal.querySelector(`#${cropVariant.id}`)?.querySelector('[data-bs-option].active')?.classList.remove('active')
this.currentModal.querySelector(`#${cropVariant.id}`)?.querySelector(`[data-bs-option="${cropVariant.selectedRatio}"]`)?.classList.add('active')
/**
* Setting the aspect ratio cause a redraw of the crop area so we need to manually reset it to last data
*/
(3-3/3)