Sergej Pozdnyakov 7 years ago
commit 725e480400

@ -61,8 +61,17 @@ $(document).ready(function () {
win.on('close', function () { win.on('close', function () {
//Save window size and position //Save window size and position
var currentWin = this; var height = win.height;
chrome.storage.local.set({'windowSize': {height: win.height, width: win.width, x: win.x, y: win.y}}, function () { var width = win.width;
if (height < 400) {
height = 400
}
if (width < 512) {
width = 512
}
chrome.storage.local.set({'windowSize': {height: height, width: width, x: win.x, y: win.y}}, function () {
// Notify that we saved. // Notify that we saved.
console.log('Settings saved'); console.log('Settings saved');
}); });

@ -411,8 +411,11 @@ TABS.mission_control.initialize = function (callback) {
MSP.send_message(MSPCodes.MSP_WP_GETINFO, false, false, getNextPoint); MSP.send_message(MSPCodes.MSP_WP_GETINFO, false, false, getNextPoint);
} }
function getNextPoint() { function getNextPoint() {
if (MISSION_PLANER.countBusyPoints == 0) {
return;
}
var coord; var coord;
if (pointForSend > 0) { if (pointForSend > 0) {
// console.log(MISSION_PLANER.bufferPoint.lon); // console.log(MISSION_PLANER.bufferPoint.lon);

@ -564,7 +564,7 @@ TABS.profiles.initialize = function (callback, scrollPosition) {
} }
function processHtml() { function processHtml() {
var modal;
var $presetList = $('#presets-list'); var $presetList = $('#presets-list');
var presetsList = presets.model.extractPresetNames(presets.presets); var presetsList = presets.model.extractPresetNames(presets.presets);
@ -590,7 +590,7 @@ TABS.profiles.initialize = function (callback, scrollPosition) {
$('#execute-button').click(function () { $('#execute-button').click(function () {
applyAndSave(); applyAndSave();
OSD.GUI.jbox.close(); modal.close();
googleAnalytics.sendEvent('Presets', 'Applied', currentPreset.name); googleAnalytics.sendEvent('Presets', 'Applied', currentPreset.name);
}); });
@ -600,7 +600,7 @@ TABS.profiles.initialize = function (callback, scrollPosition) {
//noinspection JSValidateTypes //noinspection JSValidateTypes
$('#content').scrollTop((scrollPosition) ? scrollPosition : 0); $('#content').scrollTop((scrollPosition) ? scrollPosition : 0);
var modal = new jBox('Modal', { modal = new jBox('Modal', {
width: 600, width: 600,
height: 240, height: 240,
closeButton: 'title', closeButton: 'title',

Loading…
Cancel
Save