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
d03d6f6b
Commit
d03d6f6b
authored
Nov 13, 2021
by
张超军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
旋转后平移
parent
df9a82fb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
src/views/Editor/modules/imageEd.vue
+8
-8
vue.config.js
+1
-1
No files found.
src/views/Editor/modules/imageEd.vue
View file @
d03d6f6b
<!--
<!--
* @Author: your name
* @Author: your name
* @Date: 2021-10-22 11:36:10
* @Date: 2021-10-22 11:36:10
* @LastEditTime: 2021-11-13 1
5:01:29
* @LastEditTime: 2021-11-13 1
6:29:53
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
* @FilePath: \指纹系统\founder_vue\src\views\Editor\modules\imageEd.vue
...
@@ -1035,7 +1035,7 @@ export default {
...
@@ -1035,7 +1035,7 @@ export default {
imageEditor
.
rotate
(
30
);
imageEditor
.
rotate
(
30
);
self
.
historys
.
push
(
'旋转'
)
self
.
historys
.
push
(
'旋转'
)
let
canvasImage
=
imageEditor
.
_graphics
.
getCanvasImage
()
let
canvasImage
=
imageEditor
.
_graphics
.
getCanvasImage
()
$
(
'.tzdDrawing'
).
css
(
'transform'
,
`rotate(
${
canvasImage
.
angle
}
deg)`
);
$
(
'.tzdDrawing'
).
css
(
'transform'
,
`rotate(
${
canvasImage
.
angle
}
deg)
scale(
${
self
.
zoomLevel
}
)
`
);
// 每次旋转时,位置都会改变,需要重新定位
// 每次旋转时,位置都会改变,需要重新定位
if
(
self
.
move_left
&&
self
.
move_top
)
{
if
(
self
.
move_left
&&
self
.
move_top
)
{
...
@@ -1054,7 +1054,7 @@ export default {
...
@@ -1054,7 +1054,7 @@ export default {
self
.
isRightRotate
=
true
self
.
isRightRotate
=
true
imageEditor
.
rotate
(
-
30
);
imageEditor
.
rotate
(
-
30
);
let
canvasImage
=
imageEditor
.
_graphics
.
getCanvasImage
()
let
canvasImage
=
imageEditor
.
_graphics
.
getCanvasImage
()
$
(
'.tzdDrawing'
).
css
(
'transform'
,
`rotate(
${
canvasImage
.
angle
}
deg)`
)
$
(
'.tzdDrawing'
).
css
(
'transform'
,
`rotate(
${
canvasImage
.
angle
}
deg)
scale(
${
self
.
zoomLevel
}
)
`
)
self
.
historys
.
push
(
'旋转'
)
self
.
historys
.
push
(
'旋转'
)
// 每次旋转时,位置都会改变,需要重新定位
// 每次旋转时,位置都会改变,需要重新定位
...
@@ -1075,7 +1075,7 @@ export default {
...
@@ -1075,7 +1075,7 @@ export default {
self
.
startPlace
=
self
.
inputRotationRange
;
self
.
startPlace
=
self
.
inputRotationRange
;
// 特征点的图层也要跟着转
// 特征点的图层也要跟着转
$
(
'.tzdDrawing'
).
css
(
"transform"
,
`rotate(
${
self
.
inputRotationRange
}
deg)`
)
$
(
'.tzdDrawing'
).
css
(
"transform"
,
`rotate(
${
self
.
inputRotationRange
}
deg)
scale(
${
self
.
zoomLevel
}
)
`
)
};
};
$
(
document
).
on
(
'mousemove'
,
changeAngle
);
$
(
document
).
on
(
'mousemove'
,
changeAngle
);
...
@@ -1091,7 +1091,7 @@ export default {
...
@@ -1091,7 +1091,7 @@ export default {
self
.
startPlace
=
self
.
inputRotationRange
;
self
.
startPlace
=
self
.
inputRotationRange
;
self
.
historys
.
push
(
'旋转'
)
self
.
historys
.
push
(
'旋转'
)
// 特征点的图层也要跟着转
// 特征点的图层也要跟着转
$
(
'.tzdDrawing'
).
css
(
"transform"
,
`rotate(
${
self
.
inputRotationRange
}
deg)`
)
$
(
'.tzdDrawing'
).
css
(
"transform"
,
`rotate(
${
self
.
inputRotationRange
}
deg)
scale(
${
self
.
zoomLevel
}
)
`
)
});
});
// 划线事件
// 划线事件
...
@@ -1502,11 +1502,13 @@ export default {
...
@@ -1502,11 +1502,13 @@ export default {
},
true
)
},
true
)
// console.log(imageEditor._graphics.getImageProperties());
// console.log(imageEditor._graphics.getImageProperties());
// console.log(imageEditor._graphics.getCanvasImage());
// console.log(imageEditor._graphics.getCanvasImage());
let
canvasImage
=
imageEditor
.
_graphics
.
getCanvasImage
()
// $('.tzdDrawing').css('left', `${originleft + (x2 - x1)}px`)
// $('.tzdDrawing').css('left', `${originleft + (x2 - x1)}px`)
// $('.tzdDrawing').css('top', `${origintop + (y2 - y1)}px`)
// $('.tzdDrawing').css('top', `${origintop + (y2 - y1)}px`)
// $('.tzdDrawing').css('transform', `translate(${x2 - x1}px,${y2 - y1}px)`)
// $('.tzdDrawing').css('transform', `translate(${x2 - x1}px,${y2 - y1}px)`)
// TODO
$
(
'.tzdDrawing'
).
css
(
'transform'
,
`translate(
${
Number
(
self
.
tzdDrawingLeft
)
+
(
x2
-
x1
)}
px,
${
Number
(
self
.
tzdDrawingTop
)
+
(
y2
-
y1
)}
px) scale(
${
self
.
zoomLevel
}
)`
)
$
(
'.tzdDrawing'
).
css
(
'transform'
,
`translate(
${
Number
(
self
.
tzdDrawingLeft
)
+
(
x2
-
x1
)}
px,
${
Number
(
self
.
tzdDrawingTop
)
+
(
y2
-
y1
)}
px) scale(
${
self
.
zoomLevel
}
)`
)
$
(
'.tzdDrawing_2'
).
css
(
'transform'
,
`translate(
${
Number
(
self
.
tzdDrawingLeft
)
+
(
x2
-
x1
)}
px,
${
Number
(
self
.
tzdDrawingTop
)
+
(
y2
-
y1
)}
px) scale(
${
self
.
zoomLevel
}
)`
)
$
(
'.tzdDrawing_2'
).
css
(
'transform'
,
`translate(
${
Number
(
self
.
tzdDrawingLeft
)
+
(
x2
-
x1
)}
px,
${
Number
(
self
.
tzdDrawingTop
)
+
(
y2
-
y1
)}
px) scale(
${
self
.
zoomLevel
}
)`
)
...
@@ -3507,9 +3509,7 @@ export default {
...
@@ -3507,9 +3509,7 @@ export default {
this
.
imageEditor
.
rotate
(
deg
)
this
.
imageEditor
.
rotate
(
deg
)
let
canvasImage
=
this
.
imageEditor
.
_graphics
.
getCanvasImage
()
let
canvasImage
=
this
.
imageEditor
.
_graphics
.
getCanvasImage
()
this
.
startPlace
=
newValue
;
this
.
startPlace
=
newValue
;
$
(
'.tzdDrawing'
).
css
(
'transform'
,
`rotate(
${
canvasImage
.
angle
}
deg)`
)
$
(
'.tzdDrawing'
).
css
(
'transform'
,
`rotate(
${
canvasImage
.
angle
}
deg) scale(
${
self
.
zoomLevel
}
)`
)
// 特征点的图层也要跟着转
$
(
'.tzdDrawing'
).
css
(
"transform"
,
`rotate(
${
newValue
}
deg)`
)
},
},
inputRemoveWhiteRange
(
newValue
,
oldValue
)
{
inputRemoveWhiteRange
(
newValue
,
oldValue
)
{
this
.
imageEditor
.
applyFilter
(
'removeColor'
,
{
this
.
imageEditor
.
applyFilter
(
'removeColor'
,
{
...
...
vue.config.js
View file @
d03d6f6b
/*
/*
* @Author: your name
* @Author: your name
* @Date: 2021-09-07 09:57:48
* @Date: 2021-09-07 09:57:48
* @LastEditTime: 2021-11-13 1
1:09:56
* @LastEditTime: 2021-11-13 1
5:40:37
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @Description: In User Settings Edit
* @FilePath: \指纹系统\founder_vue\vue.config.js
* @FilePath: \指纹系统\founder_vue\vue.config.js
...
...
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