Showing
1 changed file
with
6 additions
and
4 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-01-22 11:40:12 | 2 | * @Date: 2025-01-22 11:40:12 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-03-04 15:13:41 | 4 | + * @LastEditTime: 2025-03-04 16:07:51 |
| 5 | * @FilePath: /map-demo/src/views/mapCutter.vue | 5 | * @FilePath: /map-demo/src/views/mapCutter.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -110,8 +110,8 @@ | ... | @@ -110,8 +110,8 @@ |
| 110 | 110 | ||
| 111 | <!-- 旋转控制 --> | 111 | <!-- 旋转控制 --> |
| 112 | <div class="rotate-control"> | 112 | <div class="rotate-control"> |
| 113 | - <button class="z-button" @click="rotateMap(1)">↺</button> | 113 | + <button class="z-button" @click="rotateMap(1)">↻</button> |
| 114 | - <button class="z-button" @click="rotateMap(-1)">↻</button> | 114 | + <button class="z-button" @click="rotateMap(-1)">↺</button> |
| 115 | </div> | 115 | </div> |
| 116 | 116 | ||
| 117 | <!-- 透明度控制 --> | 117 | <!-- 透明度控制 --> |
| ... | @@ -416,7 +416,7 @@ const rotateMap = (deltaAngle) => { | ... | @@ -416,7 +416,7 @@ const rotateMap = (deltaAngle) => { |
| 416 | if (!imageLayer.value || !imageURL.value) return; | 416 | if (!imageLayer.value || !imageURL.value) return; |
| 417 | 417 | ||
| 418 | imageRotation.value = (imageRotation.value + deltaAngle) % 360; | 418 | imageRotation.value = (imageRotation.value + deltaAngle) % 360; |
| 419 | - console.log(`图片旋转: ${imageRotation.value}°`); | 419 | + // console.log(`图片旋转: ${imageRotation.value}°`); |
| 420 | 420 | ||
| 421 | const img = new Image(); | 421 | const img = new Image(); |
| 422 | img.src = imageURL.value; | 422 | img.src = imageURL.value; |
| ... | @@ -495,6 +495,8 @@ const rotateMap = (deltaAngle) => { | ... | @@ -495,6 +495,8 @@ const rotateMap = (deltaAngle) => { |
| 495 | }); | 495 | }); |
| 496 | 496 | ||
| 497 | map.value.add(imageLayer.value); | 497 | map.value.add(imageLayer.value); |
| 498 | + // FIXME: 旋转后的图片位置会有偏移,需要调整 | ||
| 499 | + moveImage('down') | ||
| 498 | }; | 500 | }; |
| 499 | }; | 501 | }; |
| 500 | 502 | ... | ... |
-
Please register or login to post a comment