Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
founder_vue
Commits
2c19445a
Commit
2c19445a
authored
Nov 09, 2021
by
liyuhang19990520
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
旋转bug
parent
92f43cf7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
8 deletions
+30
-8
src/views/Editor/modules/imageEd.vue
+23
-1
src/views/Editor/modules/imageEdAJ.vue
+7
-7
No files found.
src/views/Editor/modules/imageEd.vue
View file @
2c19445a
<!--
* @Author: your name
* @Date: 2021-10-22 11:36:10
* @LastEditTime: 2021-11-0
6 15:12:14
* @LastEditTime: 2021-11-0
8 20:47:21
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
...
...
@@ -1011,6 +1011,17 @@ export default {
self
.
historys
.
push
(
'旋转'
)
let
canvasImage
=
imageEditor
.
_graphics
.
getCanvasImage
()
$
(
'.tzdDrawing'
).
css
(
'transform'
,
`rotate(
${
canvasImage
.
angle
}
deg)`
);
// 每次旋转时,位置都会改变,需要重新定位
if
(
self
.
move_left
&&
self
.
move_top
)
{
imageEditor
.
_graphics
.
setImageProperties
({
left
:
self
.
move_left
+
canvasImage
.
left
,
top
:
self
.
move_top
+
canvasImage
.
top
,
originX
:
'left'
,
originY
:
'top'
},
true
)
}
});
// 向右旋转30°
$btnRotateCounterClockWise
.
on
(
'click'
,
function
()
{
...
...
@@ -1021,6 +1032,17 @@ export default {
let
canvasImage
=
imageEditor
.
_graphics
.
getCanvasImage
()
$
(
'.tzdDrawing'
).
css
(
'transform'
,
`rotate(
${
canvasImage
.
angle
}
deg)`
)
self
.
historys
.
push
(
'旋转'
)
// 每次旋转时,位置都会改变,需要重新定位
if
(
self
.
move_left
&&
self
.
move_top
)
{
imageEditor
.
_graphics
.
setImageProperties
({
left
:
self
.
move_left
+
canvasImage
.
left
,
top
:
self
.
move_top
+
canvasImage
.
top
,
originX
:
'left'
,
originY
:
'top'
},
true
)
}
});
// 滑动旋转事件
$inputRotationRange
.
on
(
'mousedown'
,
function
()
{
...
...
src/views/Editor/modules/imageEdAJ.vue
View file @
2c19445a
<!--
* @Author: your name
* @Date: 2021-10-22 11:36:10
* @LastEditTime: 2021-11-08 20:
41:53
* @LastEditTime: 2021-11-08 20:
51:07
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
...
...
@@ -1412,12 +1412,12 @@ export default {
}
// console.log(self.mouseEnlarge);
if
(
self
.
mouseEnlarge
)
{
imageEditor
.
_graphics
.
setImageProperties
({
left
:
0
,
top
:
0
,
originX
:
'left'
,
originY
:
'top'
},
true
)
//
imageEditor._graphics.setImageProperties({
//
left: 0,
//
top: 0,
//
originX: 'left',
//
originY: 'top'
//
}, true)
// 放大
if
(
e
.
clientY
<=
originPointer
.
y
)
{
self
.
zoomLevel
=
self
.
zoomLevel
+
0.01
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment