Merge pull request #362 from Afinogen/fix-js-bugs

Fix js bugs
pull/363/head
Konstantin Sharlaimov 7 years ago committed by GitHub
commit 5245fb3bfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -61,8 +61,17 @@ $(document).ready(function () {
win.on('close', function () {
//Save window size and position
var currentWin = this;
chrome.storage.local.set({'windowSize': {height: win.height, width: win.width, x: win.x, y: win.y}}, function () {
var height = win.height;
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.
console.log('Settings saved');
});

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

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

Loading…
Cancel
Save