- removed some map css animations when switching between maps

This commit is contained in:
Mark Friedrich
2018-07-13 19:50:37 +02:00
parent c9ce37290f
commit 5d3e30c92d
5 changed files with 68 additions and 148 deletions

View File

@@ -1240,93 +1240,45 @@ define([
return elements;
};
// if map empty (no systems), execute callback and return
// no visual effects on larger maps
if(
systemElements.length === 0 ||
systemElements.length > 20 ||
endpointElements.length === 0
){
callback();
return;
}
let mapElements = systemElements.add(endpointElements).add(connectorElements);
// show nice animation
if(show === 'show'){
systemElements = hideElements(systemElements);
endpointElements = hideElements(endpointElements);
connectorElements = hideElements(connectorElements);
overlayElements = hideElements(overlayElements);
hideElements(systemElements);
hideElements(endpointElements);
hideElements(connectorElements);
hideElements(overlayElements);
systemElements.velocity({
overlayElements.velocity('transition.fadeIn', {
duration: 60,
display: 'auto'
});
mapElements.velocity({
translateY: [ 0, -20],
opacity: [ 1, 0 ]
},{
duration: 300,
}, {
duration: 150,
easing: 'easeOut',
complete: function(){
// show connections
endpointElements.velocity('transition.fadeIn', {
duration: 0
});
connectorElements.velocity('transition.fadeIn', {
stagger: 30,
duration: 120,
complete: function(){
callback();
}
});
// show overlay elements (if some exist)
if(overlayElements.length > 0){
overlayElements.delay(300).velocity('transition.fadeIn', {
stagger: 50,
duration: 180,
display: 'auto'
});
}
callback();
}
});
}else if(show === 'hide'){
$('.mCSB_container').velocity('callout.shake', {
stagger: 0,
drag: false,
duration: 180,
display: 'auto'
});
overlayElements.velocity('transition.fadeOut', {
stagger: 50,
drag: true,
duration: 180,
duration: 60,
display: 'auto'
});
endpointElements.velocity('transition.fadeOut', {
duration: 0,
display: 'block',
mapElements.velocity({
translateY: [ -20, 0 ],
opacity: [ 0, 1 ]
}, {
duration: 150,
easing: 'easeOut',
complete: function(){
// show connections
connectorElements.velocity('transition.fadeOut', {
stagger: 0,
drag: true,
duration: 20,
display: 'block'
});
systemElements.delay(100).velocity({
translateY: [ -20, 0 ],
opacity: [ 0, 1 ]
},{
duration: 180,
display: 'block',
easing: 'easeOut',
complete: function(){
callback();
}
});
callback();
}
});
}
@@ -1681,6 +1633,9 @@ define([
});
headElement.on('shown', function(e, editable) {
// hide tooltip when xEditable is visible
system.toggleSystemTooltip('hide', {});
let inputElement = editable.input.$input.select();
// "fake" timeout until dom rendered
@@ -1689,6 +1644,11 @@ define([
input.select();
}, 0, inputElement);
});
headElement.on('hidden', function(e, editable) {
// show tooltip "again" on xEditable hidden
system.toggleSystemTooltip('show', {show: true});
});
};
/**

View File

@@ -523,7 +523,7 @@ define([
},{
targets: 7,
title: 'updated',
width: 80,
width: 60,
className: ['text-right', config.tableCellCounterClass].join(' '),
data: 'updated.updated'
},{
@@ -642,7 +642,7 @@ define([
}
});
rows.to$().find('.' + config.tableCellCounterClass + ':not([data-counter])').initTimestampCounter();
rows.to$().find('.' + config.tableCellCounterClass + ':not([data-counter])').initTimestampCounter('d');
let animationRows = rows.to$().filter(function() {
return (

View File

@@ -1240,93 +1240,45 @@ define([
return elements;
};
// if map empty (no systems), execute callback and return
// no visual effects on larger maps
if(
systemElements.length === 0 ||
systemElements.length > 20 ||
endpointElements.length === 0
){
callback();
return;
}
let mapElements = systemElements.add(endpointElements).add(connectorElements);
// show nice animation
if(show === 'show'){
systemElements = hideElements(systemElements);
endpointElements = hideElements(endpointElements);
connectorElements = hideElements(connectorElements);
overlayElements = hideElements(overlayElements);
hideElements(systemElements);
hideElements(endpointElements);
hideElements(connectorElements);
hideElements(overlayElements);
systemElements.velocity({
overlayElements.velocity('transition.fadeIn', {
duration: 60,
display: 'auto'
});
mapElements.velocity({
translateY: [ 0, -20],
opacity: [ 1, 0 ]
},{
duration: 300,
}, {
duration: 150,
easing: 'easeOut',
complete: function(){
// show connections
endpointElements.velocity('transition.fadeIn', {
duration: 0
});
connectorElements.velocity('transition.fadeIn', {
stagger: 30,
duration: 120,
complete: function(){
callback();
}
});
// show overlay elements (if some exist)
if(overlayElements.length > 0){
overlayElements.delay(300).velocity('transition.fadeIn', {
stagger: 50,
duration: 180,
display: 'auto'
});
}
callback();
}
});
}else if(show === 'hide'){
$('.mCSB_container').velocity('callout.shake', {
stagger: 0,
drag: false,
duration: 180,
display: 'auto'
});
overlayElements.velocity('transition.fadeOut', {
stagger: 50,
drag: true,
duration: 180,
duration: 60,
display: 'auto'
});
endpointElements.velocity('transition.fadeOut', {
duration: 0,
display: 'block',
mapElements.velocity({
translateY: [ -20, 0 ],
opacity: [ 0, 1 ]
}, {
duration: 150,
easing: 'easeOut',
complete: function(){
// show connections
connectorElements.velocity('transition.fadeOut', {
stagger: 0,
drag: true,
duration: 20,
display: 'block'
});
systemElements.delay(100).velocity({
translateY: [ -20, 0 ],
opacity: [ 0, 1 ]
},{
duration: 180,
display: 'block',
easing: 'easeOut',
complete: function(){
callback();
}
});
callback();
}
});
}
@@ -1681,6 +1633,9 @@ define([
});
headElement.on('shown', function(e, editable) {
// hide tooltip when xEditable is visible
system.toggleSystemTooltip('hide', {});
let inputElement = editable.input.$input.select();
// "fake" timeout until dom rendered
@@ -1689,6 +1644,11 @@ define([
input.select();
}, 0, inputElement);
});
headElement.on('hidden', function(e, editable) {
// show tooltip "again" on xEditable hidden
system.toggleSystemTooltip('show', {show: true});
});
};
/**

View File

@@ -523,7 +523,7 @@ define([
},{
targets: 7,
title: 'updated',
width: 80,
width: 60,
className: ['text-right', config.tableCellCounterClass].join(' '),
data: 'updated.updated'
},{
@@ -642,7 +642,7 @@ define([
}
});
rows.to$().find('.' + config.tableCellCounterClass + ':not([data-counter])').initTimestampCounter();
rows.to$().find('.' + config.tableCellCounterClass + ':not([data-counter])').initTimestampCounter('d');
let animationRows = rows.to$().filter(function() {
return (

View File

@@ -237,10 +237,10 @@
The <em>"Scope"</em> of a connection can be changed by using the context menu of a connection <small>(<a href="#" data-target="#pf-manual-scrollspy-anchor-connection-contextmenu">more</a>)</small>.
</p>
<ul class="list-unstyled" style=" margin-left: 10px;">
<li><div class="pf-fake-connection"></div> Wormhole<small> (Wormhole has not yet had its stability significantly disrupted)</small></li>
<li><div class="pf-fake-connection pf-map-connection-stargate"></div> Stargate<small> (Stargates are static <em>"K-space"</em> connections)</small></li>
<li><div class="pf-fake-connection pf-map-connection-jumpbridge"></div> Jumpbridge<small> (Jumpbridges are player build <em>"K-space"</em> connections)</small></li>
<li><div class="pf-fake-connection pf-map-connection-abyssal"></div> Abyssal<small> (abyssal zone entrance <em>"a-space"</em> connections)</small></li>
<li><div class="pf-fake-connection"></div>&nbsp;&nbsp;Wormhole<small> (Wormhole has not yet had its stability significantly disrupted)</small></li>
<li><div class="pf-fake-connection pf-map-connection-stargate"></div>&nbsp;&nbsp;Stargate<small> (Stargates are static <em>"K-space"</em> connections)</small></li>
<li><div class="pf-fake-connection pf-map-connection-jumpbridge"></div>&nbsp;&nbsp;Jumpbridge<small> (Jumpbridges are player build <em>"K-space"</em> connections)</small></li>
<li><div class="pf-fake-connection pf-map-connection-abyssal"></div>&nbsp;&nbsp;Abyssal<small> (abyssal zone entrance <em>"a-space"</em> connections)</small></li>
</ul>
<h4 id="pf-manual-scrollspy-anchor-connection-status">Connection status</h4>
<p>