fix(signature): 시그니처 이미지 크롭 비율 자유 조정 허용

This commit is contained in:
Yu Sung
2026-03-26 15:17:53 +09:00
parent b976b93464
commit 3865eec233
2 changed files with 17 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
# 20260326_시그니처이미지크롭비율자유조정
## 구현 항목
- [x] `src/views/Signature/SignatureManagement.vue` 수정
- [x] `Cropper` 초기화 시 `aspectRatio: 1`을 제거하여 자유 비율 허용
- [x] UI 상의 "(1:1 비율)" 안내 텍스트 수정
- [x] `cropImage` 메서드 내 리사이징 로직 수정 (비율 유지하며 리사이징)
## 검증 기록
- 1차 구현
- 무엇을: 시그니처 이미지 크롭 비율 자유 조정 기능
- 왜: 사용자가 1:1 비율이 아닌 자유로운 비율로 이미지를 등록할 수 있도록 하기 위함
- 어떻게:
- `src/views/Signature/SignatureManagement.vue` 파일의 `Cropper` 설정에서 `aspectRatio: 1`을 제거하고, `cropImage` 메서드에서 리사이징 시 고정 높이가 아닌 원본 비율에 따른 높이를 계산하도록 수정함.
- `work/check-commit-message-rules.sh`를 사용하여 커밋 메시지 규칙 준수 여부 확인 완료.

View File

@@ -376,7 +376,7 @@
persistent
>
<v-card>
<v-card-title>이미지 크롭 (1:1 비율)</v-card-title>
<v-card-title>이미지 크롭</v-card-title>
<v-card-text>
<div class="cropper-wrapper">
<img
@@ -508,7 +508,6 @@ export default {
this.cropper.destroy()
}
this.cropper = new Cropper(this.$refs.cropper_image, {
aspectRatio: 1,
viewMode: 1,
})
})
@@ -535,7 +534,7 @@ export default {
const MAX_WIDTH = 800
if (canvas.width > MAX_WIDTH) {
const height = MAX_WIDTH
const height = (MAX_WIDTH * canvas.height) / canvas.width
const resizeCanvas = document.createElement('canvas')
resizeCanvas.width = MAX_WIDTH
resizeCanvas.height = height