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
d9bba829
Commit
d9bba829
authored
May 21, 2020
by
任建锋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--
parent
7b484780
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
712 additions
and
145 deletions
+712
-145
index.html
public/index.html
+1
-1
project.js
src/store/modules/project.js
+6
-5
Views.vue
src/views/Editor/Views.vue
+12
-0
RuntimeLayer.vue
src/views/Editor/components/RuntimeLayer.vue
+2
-2
drawCanvasPanel.vue
src/views/Editor/components/drawCanvasPanel.vue
+20
-24
editControlView copy 2.vue
src/views/Editor/components/editControlView copy 2.vue
+525
-0
editControlView.vue
src/views/Editor/components/editControlView.vue
+146
-113
No files found.
public/index.html
View file @
d9bba829
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<title>
烽火台
</title>
<title>
烽火台
</title>
<script
src=
"//yun.duiba.com.cn/js-libs/psd.js/3.2.0/psd.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/js-libs/psd.js/3.2.0/psd.min.js"
></script>
<script
src=
"//yun.duiba.com.cn/editor/zeroing/libs/engine.
a0a1c11664d9ed4ac76999a01ceb9a729e1b27c1
.js"
></script>
<script
src=
"//yun.duiba.com.cn/editor/zeroing/libs/engine.
c70c23ccac5955f9f2cd400fda1e6bba2fb413a3
.js"
></script>
</head>
</head>
<body>
<body>
...
...
src/store/modules/project.js
View file @
d9bba829
...
@@ -771,7 +771,7 @@ export const projectStore = {
...
@@ -771,7 +771,7 @@ export const projectStore = {
// debugger;
// debugger;
let
getTopView
=
node
=>
{
let
getTopView
=
node
=>
{
console
.
log
(
"node"
,
node
)
//
console.log("node",node)
if
(
node
.
parent
&&
!
node
.
parent
.
parent
)
{
if
(
node
.
parent
&&
!
node
.
parent
.
parent
)
{
return
node
;
return
node
;
}
else
{
}
else
{
...
@@ -816,12 +816,13 @@ export const projectStore = {
...
@@ -816,12 +816,13 @@ export const projectStore = {
_props
[
key
]
=
value
;
_props
[
key
]
=
value
;
});
});
console
.
log
(
"props"
,
props
,
state
.
activeComponent
)
console
.
log
(
"props"
,
commit
,
state
,
props
,
state
.
activeComponent
)
//
if(nodeUUidCatch==state.activeComponent.uuid){
if
(
nodeUUidCatch
==
state
.
activeComponent
.
uuid
){
events
.
$emit
(
'canvasKeyVupdate'
,
{
props
,
activeComponent
:
state
.
activeComponent
}
);
events
.
$emit
(
'canvasKeyVupdate'
,
{
props
},
"update"
);
//
}
}
nodeUUidCatch
=
state
.
activeComponent
.
uuid
nodeUUidCatch
=
state
.
activeComponent
.
uuid
console
.
log
(
"nodeUUidCatch"
,
nodeUUidCatch
)
console
.
log
(
"nodeUUidCatch"
,
nodeUUidCatch
)
/*if (hasAssetsDep) {
/*if (hasAssetsDep) {
commit('updateAssetDep');
commit('updateAssetDep');
}*/
}*/
...
...
src/views/Editor/Views.vue
View file @
d9bba829
...
@@ -131,6 +131,18 @@
...
@@ -131,6 +131,18 @@
let
data
=
this
.
$refs
.
tree
.
getCurrentNode
()
let
data
=
this
.
$refs
.
tree
.
getCurrentNode
()
let
nodeDom
=
this
.
$refs
.
tree
.
getNode
(
data
)
let
nodeDom
=
this
.
$refs
.
tree
.
getNode
(
data
)
this
.
$store
.
dispatch
(
'activeComponent'
,
{
data
,
node
:
nodeDom
});
this
.
$store
.
dispatch
(
'activeComponent'
,
{
data
,
node
:
nodeDom
});
let
styleCatch
=
{
x
:
parseInt
(
node
.
x
),
y
:
parseInt
(
node
.
y
),
anchorX
:
parseInt
(
node
.
anchorX
),
anchorY
:
parseInt
(
node
.
anchorY
),
imageWidth
:
parseInt
(
node
.
imageWidth
),
imageHeight
:
parseInt
(
node
.
imageHeight
),
width
:
parseInt
(
node
.
width
),
height
:
parseInt
(
node
.
height
),
}
this
.
$store
.
dispatch
(
"modifyProperties"
,
styleCatch
);
}
}
},
},
updateFilter
()
{
updateFilter
()
{
...
...
src/views/Editor/components/RuntimeLayer.vue
View file @
d9bba829
...
@@ -81,8 +81,8 @@
...
@@ -81,8 +81,8 @@
modifyProps
(
nodePath
,
props
,
callback
)
{
modifyProps
(
nodePath
,
props
,
callback
)
{
let
result
=
engine
.
editorStage
.
modifyProps
(
nodePath
,
props
);
let
result
=
engine
.
editorStage
.
modifyProps
(
nodePath
,
props
);
if
(
result
)
{
if
(
result
)
{
//
callback()
callback
()
setTimeout
(
callback
,
10
0
);
//setTimeout(callback,
0);
}
}
return
result
;
return
result
;
},
},
...
...
src/views/Editor/components/drawCanvasPanel.vue
View file @
d9bba829
...
@@ -78,31 +78,24 @@
...
@@ -78,31 +78,24 @@
console
.
log
(
url
)
console
.
log
(
url
)
return
url
return
url
},
},
getNode
()
{
getNode
(
type
)
{
this
.
targetNode
=
this
.
$refs
.
runtimeLayer
.
getNode
(
this
.
nodePath
);
if
(
type
==
"end"
){
console
.
log
(
this
.
targetNode
.
name
,
this
.
targetNode
)
this
.
targetNode
=
this
.
$refs
.
runtimeLayer
.
getNode
(
this
.
nodePath
);
events
.
$emit
(
'locate-view-node-active'
,
this
.
targetNode
);
console
.
log
(
"this.targetNode"
,
this
.
targetNode
)
events
.
$emit
(
'locate-view-node-active'
,
this
.
targetNode
);
}
else
if
(
type
==
"update"
){
this
.
targetNode
=
this
.
$refs
.
runtimeLayer
.
getNode
(
this
.
nodePath
);
}
},
},
onModifyProp
(
key
,
value
,
data
)
{
onModifyProp
(
key
,
value
,
type
)
{
console
.
log
(
"修改 key v"
)
let
activeComponent
=
data
.
activeComponent
console
.
log
(
"activeComponent"
,
activeComponent
)
// if(activeComponent){
// return false;
// }
// if(activeComponent.uuid==this.targetNode.uuid){
console
.
log
(
"修改 key v"
)
if
(
this
.
$refs
.
runtimeLayer
){
if
(
this
.
$refs
.
runtimeLayer
){
this
.
$refs
.
runtimeLayer
.
modifyProps
(
this
.
nodePath
,
{
this
.
$refs
.
runtimeLayer
.
modifyProps
(
this
.
nodePath
,
{
[
key
]:
value
,
[
key
]:
value
,
},
()
=>
{
},
()
=>
{
this
.
getNode
();
this
.
getNode
(
type
);
})
})
}
}
// }
// console.log(data.activeComponent.name,this.targetNode.name,this.nodePath)
},
},
onClickTouchLayer
(
e
){
onClickTouchLayer
(
e
){
const
{
x
,
y
}
=
e
;
const
{
x
,
y
}
=
e
;
...
@@ -110,19 +103,22 @@
...
@@ -110,19 +103,22 @@
return
false
;
return
false
;
}
}
console
.
log
(
"sdsd"
,
x
/
this
.
zoom
,
y
/
this
.
zoom
)
console
.
log
(
"sdsd"
,
x
/
this
.
zoom
,
y
/
this
.
zoom
)
setTimeout
(()
=>
{
//
setTimeout(()=>{
if
(
this
.
$refs
.
runtimeLayer
){
if
(
this
.
$refs
.
runtimeLayer
){
this
.
nodePath
=
this
.
$refs
.
runtimeLayer
.
getNodePathWithPos
({
x
:
x
/
this
.
zoom
,
y
:
y
/
this
.
zoom
});
this
.
nodePath
=
this
.
$refs
.
runtimeLayer
.
getNodePathWithPos
({
x
:
x
/
this
.
zoom
,
y
:
y
/
this
.
zoom
});
}
}
},
100
)
//
},100)
console
.
log
(
this
.
nodePath
)
console
.
log
(
this
.
nodePath
)
},
},
canvasKeyVupdate
(
data
){
canvasKeyVupdate
(
data
,
type
){
console
.
log
(
10
,
data
)
console
.
log
(
10
,
data
)
let
_data
=
data
;
let
_data
=
data
;
for
(
let
item
in
_data
.
props
){
for
(
let
item
in
_data
.
props
){
console
.
log
(
item
)
console
.
log
(
item
)
this
.
onModifyProp
(
item
,
_data
.
props
[
item
],
_data
)
if
(
_data
.
props
.
hasOwnProperty
(
item
)){
console
.
log
(
_data
.
props
[
item
])
this
.
onModifyProp
(
item
,
_data
.
props
[
item
],
type
)
}
}
}
},
},
canvasViewUpdate
(){
canvasViewUpdate
(){
...
@@ -131,7 +127,7 @@
...
@@ -131,7 +127,7 @@
}
}
,
canvasActiveNodeByTree
(
nodePath
){
,
canvasActiveNodeByTree
(
nodePath
){
this
.
nodePath
=
nodePath
this
.
nodePath
=
nodePath
this
.
getNode
()
this
.
getNode
(
"end"
)
}
}
},
},
computed
:
{
computed
:
{
...
@@ -159,7 +155,7 @@
...
@@ -159,7 +155,7 @@
},
},
watch
:
{
watch
:
{
nodePath
()
{
nodePath
()
{
this
.
getNode
();
this
.
getNode
(
"end"
);
},
},
views
()
{
views
()
{
this
.
$refs
.
runtimeLayer
.
showView
(
this
.
views
[
0
]);
this
.
$refs
.
runtimeLayer
.
showView
(
this
.
views
[
0
]);
...
...
src/views/Editor/components/editControlView copy 2.vue
0 → 100644
View file @
d9bba829
This diff is collapsed.
Click to expand it.
src/views/Editor/components/editControlView.vue
View file @
d9bba829
This diff is collapsed.
Click to expand it.
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