Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
PU03
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
template admin
PU03
Commits
dfce2cec
Commit
dfce2cec
authored
5 years ago
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dev commit
parent
27ae58d9
master
v1.0
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
2 deletions
+42
-2
play.component.ts
src/app/play/play.component.ts
+42
-2
No files found.
src/app/play/play.component.ts
View file @
dfce2cec
...
...
@@ -49,6 +49,7 @@ const zIndexMap = {
line
:
115
,
longAudioPlay
:
110
,
cardUp
:
110
,
cardBorder
:
111
,
lianzi
:
100
,
window
:
50
}
...
...
@@ -821,6 +822,8 @@ export class PlayComponent implements OnInit, OnDestroy {
let
A1
=
[]
let
A2
=
[]
let
A3
=
[]
let
A4
=
[]
let
A5
=
[]
cardAll
.
forEach
((
card
,
index
)
=>
{
let
pos
=
{
x
:
0
,
y
:
0
}
if
(
index
!=
0
){
...
...
@@ -839,6 +842,8 @@ export class PlayComponent implements OnInit, OnDestroy {
A1
.
push
(
temp
.
e1
)
A2
.
push
(
temp
.
e2
)
A3
.
push
(
temp
.
e3
)
A4
.
push
(
temp
.
e4
)
A5
.
push
(
temp
.
e5
)
})
let
movedDis
=
this
.
alignCenter
(
A1
)
A2
.
forEach
(
item
=>
{
...
...
@@ -847,6 +852,12 @@ export class PlayComponent implements OnInit, OnDestroy {
A3
.
forEach
(
item
=>
{
item
.
x
=
item
.
x
+
movedDis
})
A4
.
forEach
(
item
=>
{
item
.
x
=
item
.
x
+
movedDis
})
A5
.
forEach
(
item
=>
{
item
.
x
=
item
.
x
+
movedDis
})
}
createCardDown
(
index
,
label
,
pos
){
...
...
@@ -856,7 +867,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let
card
=
this
.
g_cartoon
.
createCartoonElementImageFunc
(
`card-down-
${
index
}
`
,
"
bg_card_down
"
,
(
w
,
h
)
=>
{
return
{
sx
:
(
label
.
width
+
20
)
*
this
.
g_mapScale
/
w
,
sy
:
84
*
this
.
g_mapScale
/
h
sy
:
108
*
this
.
g_mapScale
/
h
}
},
(
w
,
h
)
=>
{
return
{
...
...
@@ -865,6 +876,31 @@ export class PlayComponent implements OnInit, OnDestroy {
}
})
card
.
text
=
label
;
let
cardBB
=
card
.
ref
.
getBoundingBox
()
let
borderLeft
=
this
.
g_cartoon
.
createCartoonElementImageFunc
(
`card-down-border-left-
${
index
}
`
,
"
border_left
"
,
(
w
,
h
)
=>
{
return
{
sx
:
10
*
this
.
g_mapScale
/
w
,
sy
:
108
*
this
.
g_mapScale
/
h
}
},
(
w
,
h
)
=>
{
return
{
x
:
card
.
ref
.
x
-
((
label
.
width
+
20
)
*
this
.
g_mapScale
)
/
2
,
y
:
card
.
ref
.
y
}
})
let
borderRight
=
this
.
g_cartoon
.
createCartoonElementImageFunc
(
`card-down-border-right-
${
index
}
`
,
"
border_right
"
,
(
w
,
h
)
=>
{
return
{
sx
:
10
*
this
.
g_mapScale
/
w
,
sy
:
108
*
this
.
g_mapScale
/
h
}
},
(
w
,
h
)
=>
{
return
{
x
:
card
.
ref
.
x
+
((
label
.
width
+
20
)
*
this
.
g_mapScale
)
/
2
,
y
:
card
.
ref
.
y
}
})
borderRight
.
ref
.
visible
=
true
// 连接节点
let
dot
=
this
.
g_cartoon
.
createImage
(
"
icon_dian2
"
,
(
w
,
h
)
=>
{
...
...
@@ -919,13 +955,17 @@ export class PlayComponent implements OnInit, OnDestroy {
}
})
this
.
render
(
borderLeft
.
ref
,
zIndexMap
.
cardBorder
)
this
.
render
(
borderRight
.
ref
,
zIndexMap
.
cardBorder
)
this
.
render
(
card
.
ref
,
zIndexMap
.
cardUp
)
this
.
render
(
label
,
zIndexMap
.
cardUp
)
return
{
e1
:
card
.
ref
,
e2
:
label
,
e3
:
dot
e3
:
dot
,
e4
:
borderLeft
.
ref
,
e5
:
borderRight
.
ref
}
}
...
...
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