Skip to content

Commit 01cd3df

Browse files
committed
make mission load/save buttons a bit more swishy with colour transitions and fadeouts.
1 parent 796561e commit 01cd3df

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

tabs/mission_control.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,18 +1623,39 @@ TABS.mission_control.initialize = function (callback) {
16231623
})
16241624
});
16251625

1626-
$('#loadMissionButton').on('click', function () {
1626+
$('#loadMissionButton').on('click', function () { // load FROM FC
16271627
if (markers.length && !confirm(chrome.i18n.getMessage('confirm_delete_all_points'))) return;
1628+
$('#loadMissionButton').delay(2000).css('border', '1px solid #37a8db').css('color', '#37a8db').css('background-color', '#909000');//.css('a:hover', 'purple'); // test
1629+
// yellow=progress blue blue yellow
1630+
16281631
removeAllWaypoints();
16291632
$(this).addClass('disabled');
1633+
1634+
//$('#loadMissionButton').delay(2000).css('border', '1px solid #37a8db').css('color', '#37a8db').css('background-color', '#008000');//.css('a:hover', 'purple'); // test
1635+
// green=success blue blue green
1636+
$('#loadMissionButton').delay(3000).animate({backgroundColor: '#ffffff','color': '#37a8db'}, 'slow', 'swing',function() {
1637+
// Animation complete.
1638+
$('#loadMissionButton').removeAttr('style'); // removeAttr removes all attribure styling, returning it 'stock'
1639+
});
1640+
// return to stock white/blue after some time white blue
1641+
16301642
GUI.log('Start get point');
16311643
getWaypointsFromFC();
16321644
GUI.log('End get point');
16331645
$('#loadMissionButton').removeClass('disabled');
16341646
});
16351647

1636-
$('#saveMissionButton').on('click', function () {
1648+
$('#saveMissionButton').on('click', function () { // save TO.. FC
16371649
$(this).addClass('disabled');
1650+
1651+
$('#saveMissionButton').delay(2000).css('border', '1px solid #37a8db').css('color', '#37a8db').css('background-color', '#909000');//.css('a:hover', 'purple'); // test
1652+
// yellow=progress blue blue yellow
1653+
$('#saveMissionButton').delay(3000).animate({backgroundColor: '#ffffff','color': '#37a8db'}, 'slow', 'swing',function() {
1654+
// Animation complete.
1655+
$('#saveMissionButton').removeAttr('style'); // removeAttr removes all attribure styling, returning it 'stock'
1656+
});
1657+
// return to stock white/blue after some time white blue
1658+
16381659
GUI.log('Start send point');
16391660
sendWaypointsToFC();
16401661
GUI.log('End send point');

0 commit comments

Comments
 (0)