Merge pull request #287 from nathantsoi/fix/osd-logo

logo first, so it is overwritten by other fields in the preview
10.3.x-maintenance
borisbstyle 2016-09-19 07:15:09 +02:00 committed by GitHub
commit a0d85cc11e
1 changed files with 6 additions and 6 deletions

View File

@ -500,6 +500,12 @@ TABS.osd.initialize = function (callback) {
for(var i = 0; i < OSD.data.display_size.total; i++) {
OSD.data.preview.push([null, ' '.charCodeAt(0)]);
}
// logo first, so it gets overwritten by subsequent elements
var x = 160;
for (var i = 1; i < 5; i++) {
for (var j = 3; j < 27; j++)
OSD.data.preview[i * 30 + j] = [{name: 'LOGO', positionable: false}, x++];
}
// draw all the displayed items and the drag and drop preview images
for(let field of OSD.data.display_items) {
if (!field.preview || field.position == -1) { continue; }
@ -519,12 +525,6 @@ TABS.osd.initialize = function (callback) {
}
field.preview_img.src = canvas.toDataURL('image/png');
}
// logo
var x = 160;
for (var i = 1; i < 5; i++) {
for (var j = 3; j < 27; j++)
OSD.data.preview[i * 30 + j] = [{name: 'LOGO', positionable: false}, x++];
}
var centerishPosition = 194;
// artificial horizon
if ($('input[name="ARTIFICIAL_HORIZON"]').prop('checked')) {