Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
map-demo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-03-04 16:08:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ed6962a36ea2aa70002937b8678c20a2073d44a3
ed6962a3
1 parent
3b0994d4
fix 旋转后的图片位置会有偏移,需要调整
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
src/views/mapCutter.vue
src/views/mapCutter.vue
View file @
ed6962a
<!--
* @Date: 2025-01-22 11:40:12
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-03-04 1
5:13:4
1
* @LastEditTime: 2025-03-04 1
6:07:5
1
* @FilePath: /map-demo/src/views/mapCutter.vue
* @Description: 文件描述
-->
...
...
@@ -110,8 +110,8 @@
<!-- 旋转控制 -->
<div class="rotate-control">
<button class="z-button" @click="rotateMap(1)">
↺
</button>
<button class="z-button" @click="rotateMap(-1)">
↻
</button>
<button class="z-button" @click="rotateMap(1)">
↻
</button>
<button class="z-button" @click="rotateMap(-1)">
↺
</button>
</div>
<!-- 透明度控制 -->
...
...
@@ -416,7 +416,7 @@ const rotateMap = (deltaAngle) => {
if (!imageLayer.value || !imageURL.value) return;
imageRotation.value = (imageRotation.value + deltaAngle) % 360;
console.log(`图片旋转: ${imageRotation.value}°`);
//
console.log(`图片旋转: ${imageRotation.value}°`);
const img = new Image();
img.src = imageURL.value;
...
...
@@ -495,6 +495,8 @@ const rotateMap = (deltaAngle) => {
});
map.value.add(imageLayer.value);
// FIXME: 旋转后的图片位置会有偏移,需要调整
moveImage('down')
};
};
...
...
Please
register
or
login
to post a comment