Commit dfce2cec authored by 李维's avatar 李维

dev commit

parent 27ae58d9
......@@ -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
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment