Subject: [PATCH] fix image maniplation in v12 --- Index: Build/Sources/TypeScript/backend/image-manipulation.ts IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== diff --git a/Build/Sources/TypeScript/backend/image-manipulation.ts b/Build/Sources/TypeScript/backend/image-manipulation.ts --- a/Build/Sources/TypeScript/backend/image-manipulation.ts (revision 889b486ee93ea444ba237b54f574c7db061827af) +++ b/Build/Sources/TypeScript/backend/image-manipulation.ts (date 1716210720899) @@ -400,6 +400,7 @@ ); 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( @@ -482,8 +483,11 @@ 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 */