From 80f50df3f5015834faf349be17b4ce1f1a98a142 Mon Sep 17 00:00:00 2001 From: nathan Date: Sun, 18 Sep 2016 19:02:10 -0700 Subject: [PATCH 1/9] render the logo first, so it is overwritten by other fields in the preview --- tabs/osd.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tabs/osd.js b/tabs/osd.js index 780f90a5..2e51f11e 100755 --- a/tabs/osd.js +++ b/tabs/osd.js @@ -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')) { From 43284b6fe7256f91f224fb4c4346c9eb0fa9c761 Mon Sep 17 00:00:00 2001 From: Dan Nixon Date: Fri, 16 Sep 2016 17:04:15 +0100 Subject: [PATCH 2/9] Allow toggling the logo in preview, add altitude option --- tabs/osd.css | 4 ++-- tabs/osd.html | 18 ++++++++++++++ tabs/osd.js | 65 ++++++++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 79 insertions(+), 8 deletions(-) diff --git a/tabs/osd.css b/tabs/osd.css index 6205df45..c6c9f3fd 100644 --- a/tabs/osd.css +++ b/tabs/osd.css @@ -370,11 +370,11 @@ button { font-family: 'open_sansregular', 'Segoe UI', Tahoma, sans-serif; } -.video-types input { +.spacer_box div input { margin-right: 5px; } -.video-types label { +.spacer_box div label { margin-right: 10px; } diff --git a/tabs/osd.html b/tabs/osd.html index 2ab1f9d5..dc92e50b 100755 --- a/tabs/osd.html +++ b/tabs/osd.html @@ -40,6 +40,15 @@
+
+
+
Preview logo +
+
+
+ +
+
Video @@ -50,6 +59,15 @@
+
+
+
Units +
+
+
+
+
+