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
25a47f09
Commit
25a47f09
authored
May 06, 2020
by
任建锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--
parent
6f151c0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
4 deletions
+24
-4
Playground.vue
src/views/Editor/Playground.vue
+24
-4
No files found.
src/views/Editor/Playground.vue
View file @
25a47f09
...
...
@@ -12,26 +12,46 @@
import
Pane
from
'../../components/Pane'
;
import
DrawPanel
from
'./components/drawPanel'
;
import
DrawCanvasPanel
from
'./components/drawCanvasPanel'
;
import
events
from
"@/global-events.js"
export
default
{
name
:
'Playground'
,
components
:
{
Pane
,
DrawPanel
,
DrawCanvasPanel
},
props
:
{
zoom
:
0.5
},
data
:{
zoom
:
0.5
},
methods
:
{
mouseWheel
(
e
){
console
.
log
(
e
)
if
(
e
.
deltaY
>
0
){
this
.
zoom
-=
0.1
}
else
if
(
e
.
deltaY
<
0
){
this
.
zoom
+=
0.1
}
console
.
log
(
this
.
zoom
)
events
.
$emit
(
'setPlaygroundZoom'
,
{
zoom
:
this
.
zoom
});
}
},
computed
:
{
playgroundStyle
(){
alert
()
//this.zoom=0.5;
let
style
=
{
zoom
:
`
${
this
.
zoom
}
`
}
console
.
log
(
1213
,
style
)
return
style
},
},
created
(){
events
.
$emit
(
'setPlaygroundZoom'
,
{
zoom
:
this
.
zoom
});
//alert()
this
.
zoom
=
0.5
;
document
.
body
.
addEventListener
(
'mousewheel'
,(
e
)
=>
{
this
.
mouseWheel
(
e
)
},
false
)
}
};
</
script
>
...
...
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