Commit 767893a3 authored by 李维's avatar 李维

dev commit

parent dfce2cec
......@@ -51,7 +51,8 @@ const zIndexMap = {
cardUp: 110,
cardBorder: 111,
lianzi: 100,
window: 50
window: 50,
animation: 9999
}
@Component({
......@@ -656,6 +657,7 @@ export class PlayComponent implements OnInit, OnDestroy {
let A2 = []
let A3 = []
let A4 = []
let A5 = []
cardAll.forEach((card, index)=>{
let pos = {x:0, y:0}
if(index!=0){
......@@ -675,6 +677,7 @@ export class PlayComponent implements OnInit, OnDestroy {
A2.push(temp.e2)
A3.push(temp.e3)
A4.push(temp.e4)
A5.push(temp.e5)
})
let movedDis =this.alignCenter(A1)
A2.forEach(item=>{
......@@ -686,6 +689,9 @@ export class PlayComponent implements OnInit, OnDestroy {
A4.forEach(item=>{
item.x = item.x + movedDis
})
A5.forEach(item=>{
item.x = item.x + movedDis
})
}
createCardUp(index, label, pos){
......@@ -747,6 +753,21 @@ export class PlayComponent implements OnInit, OnDestroy {
card.lined = false;
card.startAni = this.g_cartoon.createAnimation("bg_star", 11, 500)
card.startAni.visible = false
card.startAni.x = card.ref.x
card.startAni.y = card.ref.y
this.render(card.startAni, zIndexMap.animation)
card.showStart = (callback?)=>{
card.startAni.visible = true
card.startAni.playEndFunc = ()=>{
card.startAni.visible = false;
callback && callback()
}
card.startAni.play()
}
this.subscribeMapDownEvent(card.id, ()=>{
if(this.m_currentSelectedCard == card.id){
this.g_enableMapDown = true;
......@@ -755,12 +776,12 @@ export class PlayComponent implements OnInit, OnDestroy {
card.showHideDoc(true)
if(this.m_currentSelectedCard){
if(this.m_currentSelectedCard.indexOf("down")!=-1){
this.lineTo(this.m_currentSelectedCard, card.id, false, ()=>{
this.g_cartoon.getCartoonElement(this.m_currentSelectedCard).showHideDoc(false)
card.showHideDoc(false)
this.lineTo(this.m_currentSelectedCard, card.id, true, ()=>{
card.showStart(()=>{
this.m_currentSelectedCard = null
this.g_enableMapDown = true;
})
})
}else{
this.g_cartoon.getCartoonElement(this.m_currentSelectedCard).showHideDoc(false)
this.m_currentSelectedCard = card.id
......@@ -779,7 +800,8 @@ export class PlayComponent implements OnInit, OnDestroy {
e1: card.ref,
e2: panzi,
e3: label,
e4: dot
e4: dot,
e5: card.startAni
}
}
......
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