expo cartel is moving
This commit is contained in:
@@ -1966,8 +1966,32 @@
|
||||
if(window.location.hash == '#black'){
|
||||
$('body').addClass('expo-black');
|
||||
}
|
||||
_$body.on('map-node-opened', checkExpoPlayerPositionning);
|
||||
_randomPlayer.start();
|
||||
}
|
||||
function checkExpoPlayerPositionning(e){
|
||||
console.log('checkExpoPlayerPositionning', e.node);
|
||||
|
||||
switch(true){
|
||||
case e.node.x > window.innerWidth-800 && e.node.y < 200:
|
||||
_audioPlayer.$container.attr('pos', 'bottom-left');
|
||||
break;
|
||||
case e.node.x > window.innerWidth-800:
|
||||
_audioPlayer.$container.attr('pos', 'top-left');
|
||||
break;
|
||||
case e.node.y < 200:
|
||||
_audioPlayer.$container.attr('pos', 'bottom-right');
|
||||
break;
|
||||
default:
|
||||
_audioPlayer.$container.attr('pos', 'top-right');
|
||||
}
|
||||
|
||||
_audioPlayer.$container.css({
|
||||
'display':"block",
|
||||
'left':e.node.x+"px",
|
||||
'top':e.node.y+"px",
|
||||
});
|
||||
}
|
||||
|
||||
// ___ _ _
|
||||
// / __|_ _(_)__| |
|
||||
|
||||
Reference in New Issue
Block a user