This commit is contained in:
libccy 2017-02-16 15:55:29 +08:00
parent 49e47650bc
commit 0178efe55a
3 changed files with 27 additions and 15 deletions

View File

@ -22376,7 +22376,7 @@
} }
}, },
logv:function(player,card,targets,event,forced,logvid){ logv:function(player,card,targets,event,forced,logvid){
var node=ui.create.div(); var node=ui.create.div('.hidden');
node.node={}; node.node={};
logvid=logvid||get.id(); logvid=logvid||get.id();
if(!player){ if(!player){
@ -22501,15 +22501,32 @@
node.targets=targets; node.targets=targets;
} }
} }
if(lib.config.low_performance||ui.historybar.scrollTop>0){ var fullheight=ui.historybar.offsetHeight;
node.classList.add('nozoom'); var num=Math.round((fullheight-8)/50);
} var margin=(fullheight-42*num)/(num+1);
node.style.transform='scale(0.8)';
ui.historybar.insertBefore(node,ui.historybar.firstChild); ui.historybar.insertBefore(node,ui.historybar.firstChild);
if(ui.historybar.childElementCount>20){ ui.refresh(node);
ui.historybar.lastChild.remove(); node.classList.remove('hidden');
} for(var i=0;i<ui.historybar.childElementCount;i++){
var current=ui.historybar.childNodes[i];
if(i<num){
current.style.transform='scale(1) translateY('+(margin+i*(42+margin)-4)+'px)';
}
else{
if(!current.removetimeout){
current.style.opacity=0;
current.style.transform='scale(1) translateY('+fullheight+'px)';
current.removetimeout=setTimeout((function(current){
return function(){
current.remove();
};
}(current)),500);
}
}
}
if(lib.config.touchscreen){ if(lib.config.touchscreen){
node.listen(ui.click.intro); node.addEventListener('touchstart',ui.click.intro);
} }
else{ else{
node.addEventListener('mouseenter',ui.click.intro); node.addEventListener('mouseenter',ui.click.intro);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View File

@ -400,7 +400,7 @@ table {
border-radius: 4px; border-radius: 4px;
visibility: hidden; visibility: hidden;
opacity: 0; opacity: 0;
overflow: scroll; overflow: hidden;
z-index: 2; z-index: 2;
transition-property: opacity,visibility; transition-property: opacity,visibility;
} }
@ -413,11 +413,7 @@ table {
margin: 0; margin: 0;
padding: 4px; padding: 4px;
display: block; display: block;
position: relative; position: absolute;
}
#historybar>div:not(.nozoom) {
animation: history_start 0.5s;
-webkit-animation: history_start 0.5s;
} }
#historybar>div>.card { #historybar>div>.card {
transform: scale(0.403846); transform: scale(0.403846);
@ -1590,7 +1586,6 @@ div:not(.handcards)>.card>.info>span,
overflow: hidden; overflow: hidden;
opacity: 0 opacity: 0
} }
/*.control:not(.nozoom){width:0}*/
.control.removing.removing2 { .control.removing.removing2 {
transform: scale(0.2) transform: scale(0.2)
} }