From b0430822b490af6b59d250bea1e4585c7b02c0b5 Mon Sep 17 00:00:00 2001 From: Delta Echo Date: Mon, 3 May 2021 15:36:23 +0200 Subject: [PATCH] Glider Instruments: Fix duplicate for-loop (AR-6201), Formatting --- Aircraft/Instruments-3d/ar-6201/ar6201.nas | 6 +----- Aircraft/Instruments-3d/bxp6401/bxp6401.nas | 2 +- Aircraft/Instruments-3d/glider/vario/S3/S3.nas | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Aircraft/Instruments-3d/ar-6201/ar6201.nas b/Aircraft/Instruments-3d/ar-6201/ar6201.nas index a06e897dc..e89c19280 100644 --- a/Aircraft/Instruments-3d/ar-6201/ar6201.nas +++ b/Aircraft/Instruments-3d/ar-6201/ar6201.nas @@ -86,12 +86,9 @@ var canvas_AR6201_base = { canvas.parsesvg(canvas_group, file, {'font-mapper': font_mapper}); - var svg_keys = me.getKeys(); + var svg_keys = me.getKeys(); foreach(var key; svg_keys) { - me[key] = canvas_group.getElementById(key); - var svg_keys = me.getKeys(); - foreach (var key; svg_keys) { me[key] = canvas_group.getElementById(key); var clip_el = canvas_group.getElementById(key ~ "_clip"); if (clip_el != nil) { @@ -106,7 +103,6 @@ var canvas_AR6201_base = { me[key].set("clip", clip_rect); me[key].set("clip-frame", canvas.Element.PARENT); } - } } me.page = canvas_group; diff --git a/Aircraft/Instruments-3d/bxp6401/bxp6401.nas b/Aircraft/Instruments-3d/bxp6401/bxp6401.nas index 9806f4976..6cc7077af 100644 --- a/Aircraft/Instruments-3d/bxp6401/bxp6401.nas +++ b/Aircraft/Instruments-3d/bxp6401/bxp6401.nas @@ -59,7 +59,7 @@ var canvas_BXP6401_base = { canvas.parsesvg(canvas_group, file, {'font-mapper': font_mapper}); - var svg_keys = me.getKeys(); + var svg_keys = me.getKeys(); foreach(var key; svg_keys) { me[key] = canvas_group.getElementById(key); diff --git a/Aircraft/Instruments-3d/glider/vario/S3/S3.nas b/Aircraft/Instruments-3d/glider/vario/S3/S3.nas index 0eb863404..7dd5a6572 100644 --- a/Aircraft/Instruments-3d/glider/vario/S3/S3.nas +++ b/Aircraft/Instruments-3d/glider/vario/S3/S3.nas @@ -53,7 +53,7 @@ var canvas_S3_base = { canvas.parsesvg(canvas_group, file, {'font-mapper': font_mapper}); - var svg_keys = me.getKeys(); + var svg_keys = me.getKeys(); foreach(var key; svg_keys) { me[key] = canvas_group.getElementById(key);