Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-editor
Project
Project
Details
Activity
Releases
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
劳工
zeroing-editor
Commits
ef8a957f
Commit
ef8a957f
authored
May 27, 2020
by
任建锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--
parent
0276125a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
drawCanvasPanel.vue
src/views/Editor/components/drawCanvasPanel.vue
+1
-0
editControlView.vue
src/views/Editor/components/editControlView.vue
+10
-10
No files found.
src/views/Editor/components/drawCanvasPanel.vue
View file @
ef8a957f
...
@@ -122,6 +122,7 @@
...
@@ -122,6 +122,7 @@
},
},
onClickTouchLayer
(
e
){
onClickTouchLayer
(
e
){
const
{
x
,
y
}
=
e
;
const
{
x
,
y
}
=
e
;
console
.
log
(
e
)
if
(
!
this
.
autoSelectState
){
if
(
!
this
.
autoSelectState
){
return
false
;
return
false
;
}
}
...
...
src/views/Editor/components/editControlView.vue
View file @
ef8a957f
...
@@ -72,8 +72,8 @@ export default {
...
@@ -72,8 +72,8 @@ export default {
// console.log(e.pageX,this.$refs.zeroPlayground.getBoundingClientRect())
// console.log(e.pageX,this.$refs.zeroPlayground.getBoundingClientRect())
// console.log(e.pageX-(this.$refs.zeroPlayground.getBoundingClientRect().left/this.zoom))
// console.log(e.pageX-(this.$refs.zeroPlayground.getBoundingClientRect().left/this.zoom))
events
.
$emit
(
"onClickTouchLayer"
,{
events
.
$emit
(
"onClickTouchLayer"
,{
x
:
e
.
pageX
-
this
.
$refs
.
zeroPlayground
.
getBoundingClientRect
().
left
/
this
.
zoom
,
x
:
(
e
.
pageX
-
this
.
$refs
.
zeroPlayground
.
getBoundingClientRect
().
left
/
this
.
zoom
)
*
window
.
devicePixelRatio
,
y
:
e
.
pageY
-
this
.
$refs
.
zeroPlayground
.
getBoundingClientRect
().
top
/
this
.
zoom
y
:
(
e
.
pageY
-
this
.
$refs
.
zeroPlayground
.
getBoundingClientRect
().
top
/
this
.
zoom
)
*
window
.
devicePixelRatio
});
});
},
},
matrixToGroup
(
matrix
)
{
matrixToGroup
(
matrix
)
{
...
@@ -124,14 +124,14 @@ export default {
...
@@ -124,14 +124,14 @@ export default {
if
(
!
this
.
canMove
)
{
if
(
!
this
.
canMove
)
{
return
;
return
;
}
}
this
.
changeMoveX
=
e
.
x
-
this
.
changeWidthStart
;
this
.
changeMoveX
=
(
e
.
x
-
this
.
changeWidthStart
)
*
window
.
devicePixelRatio
;
this
.
changeMoveY
=
e
.
y
-
this
.
changeHeightStart
;
this
.
changeMoveY
=
(
e
.
y
-
this
.
changeHeightStart
)
*
window
.
devicePixelRatio
;
// this.changeMoveOffsetX=e.offsetX
// this.changeMoveOffsetX=e.offsetX
// this.changeMoveOffsetY=e.offsetY
// this.changeMoveOffsetY=e.offsetY
this
.
changeMoveOffsetX1
=
e
.
x
;
this
.
changeMoveOffsetX1
=
e
.
x
;
this
.
changeMoveOffsetY1
=
e
.
y
;
this
.
changeMoveOffsetY1
=
e
.
y
;
this
.
changeMoveOffsetX
=
this
.
changeMoveOffsetX1
-
this
.
changeMoveOffsetX2
this
.
changeMoveOffsetX
=
(
this
.
changeMoveOffsetX1
-
this
.
changeMoveOffsetX2
)
*
window
.
devicePixelRatio
this
.
changeMoveOffsetY
=
this
.
changeMoveOffsetY1
-
this
.
changeMoveOffsetY2
this
.
changeMoveOffsetY
=
(
this
.
changeMoveOffsetY1
-
this
.
changeMoveOffsetY2
)
*
window
.
devicePixelRatio
//console.log( "this.changeMoveOffsetX",)
//console.log( "this.changeMoveOffsetX",)
this
.
changeMoveOffsetX2
=
e
.
x
;
this
.
changeMoveOffsetX2
=
e
.
x
;
this
.
changeMoveOffsetY2
=
e
.
y
;
this
.
changeMoveOffsetY2
=
e
.
y
;
...
@@ -356,10 +356,10 @@ export default {
...
@@ -356,10 +356,10 @@ export default {
}
}
let
result
=
{
let
result
=
{
width
:
`
${
(
this
.
styleCatch
.
imageWidth
?
this
.
styleCatch
.
imageWidth
:(
this
.
styleCatch
.
width
?
this
.
styleCatch
.
width
:
0
))
*
scaleX
}
px`
,
width
:
`
${
(
this
.
styleCatch
.
imageWidth
?
this
.
styleCatch
.
imageWidth
:(
this
.
styleCatch
.
width
?
this
.
styleCatch
.
width
:
0
))
*
scaleX
/
window
.
devicePixelRatio
}
px`
,
height
:
`
${
(
this
.
styleCatch
.
imageHeight
?
this
.
styleCatch
.
imageHeight
:(
this
.
styleCatch
.
height
?
this
.
styleCatch
.
height
:
0
))
*
scaleY
}
px`
,
height
:
`
${
(
this
.
styleCatch
.
imageHeight
?
this
.
styleCatch
.
imageHeight
:(
this
.
styleCatch
.
height
?
this
.
styleCatch
.
height
:
0
))
*
scaleY
/
window
.
devicePixelRatio
}
px`
,
marginTop
:
`
${
y
}
px`
,
marginTop
:
`
${
y
/
window
.
devicePixelRatio
}
px`
,
marginLeft
:
`
${
x
}
px`
,
marginLeft
:
`
${
x
/
window
.
devicePixelRatio
}
px`
,
transform
:
`rotate(
${
rotation
}
deg)`
,
transform
:
`rotate(
${
rotation
}
deg)`
,
// webkitTransformOriginY: `${ this.styleCatch.anchorY?this.styleCatch.anchorY:0}px`,
// webkitTransformOriginY: `${ this.styleCatch.anchorY?this.styleCatch.anchorY:0}px`,
// webkitTransformOriginX: `${ this.styleCatch.anchorX?this.styleCatch.anchorX:0}px`,
// webkitTransformOriginX: `${ this.styleCatch.anchorX?this.styleCatch.anchorX:0}px`,
...
...
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