From 8ad3d0d3855e58598c40aa31dda69d4a7bea6b55 Mon Sep 17 00:00:00 2001 From: Yi-Ting Tu Date: Wed, 24 Jul 2024 20:54:33 -0400 Subject: [PATCH] Clarify the behavior of Detector --- simulator/js/objs/other/Detector.js | 2 ++ simulator/js/simulator.js | 6 +++--- simulator/locales/de.js | 8 ++++++++ simulator/locales/en.js | 6 ++++++ simulator/locales/es.js | 8 ++++++++ simulator/locales/fr.js | 8 ++++++++ simulator/locales/ja.js | 8 ++++++++ simulator/locales/ko.js | 8 ++++++++ simulator/locales/nl.js | 8 ++++++++ simulator/locales/pl.js | 8 ++++++++ simulator/locales/pt_BR.js | 8 ++++++++ simulator/locales/ru.js | 8 ++++++++ simulator/locales/si.js | 8 ++++++++ simulator/locales/template.js | 8 ++++++++ simulator/locales/zh_CN.js | 6 ++++++ simulator/locales/zh_TW.js | 6 ++++++ 16 files changed, 111 insertions(+), 3 deletions(-) diff --git a/simulator/js/objs/other/Detector.js b/simulator/js/objs/other/Detector.js index 0a723a49..78ace105 100644 --- a/simulator/js/objs/other/Detector.js +++ b/simulator/js/objs/other/Detector.js @@ -31,6 +31,8 @@ objTypes['Detector'] = class extends LineObjMixin(BaseSceneObj) { } populateObjBar(objBar) { + objBar.createInfoBox(getMsg('tool_Detector_info_popover')); + objBar.createBoolean(getMsg('irradMap'), this.irradMap, function (obj, value) { obj.irradMap = value; }, null, true); diff --git a/simulator/js/simulator.js b/simulator/js/simulator.js index 497cbc30..efa4619b 100644 --- a/simulator/js/simulator.js +++ b/simulator/js/simulator.js @@ -243,7 +243,7 @@ function shootWaitingRays() { timerID = setTimeout(shootWaitingRays, firstBreak ? 100:1); firstBreak = false; document.getElementById('forceStop').style.display = ''; - document.getElementById('simulatorStatus').innerHTML = getMsg("ray_count") + shotRayCount + '
' + getMsg("total_truncation") + totalTruncation.toFixed(3) + '
' + getMsg("time_elapsed") + (new Date() - drawBeginTime) + '
'; + document.getElementById('simulatorStatus').innerHTML = getMsg("ray_count") + shotRayCount + '
' + getMsg("total_truncation") + totalTruncation.toFixed(3) + '
' + getMsg("brightness_scale") + ((brightnessScale <= 0) ? "-" : brightnessScale.toFixed(3)) + '
' + getMsg("time_elapsed") + (new Date() - drawBeginTime) + '
'; draw(true, true); // Redraw the opticalObjs to avoid outdated information (e.g. detector readings). @@ -633,7 +633,7 @@ function shootWaitingRays() { if (forceStop) { - document.getElementById('simulatorStatus').innerHTML = getMsg("ray_count") + shotRayCount + '
' + getMsg("total_truncation") + totalTruncation.toFixed(3) + '
' + getMsg("time_elapsed") + (new Date() - drawBeginTime) + '
' + getMsg("force_stopped"); + document.getElementById('simulatorStatus').innerHTML = getMsg("ray_count") + shotRayCount + '
' + getMsg("total_truncation") + totalTruncation.toFixed(3) + '
' + getMsg("brightness_scale") + ((brightnessScale <= 0) ? "-" : brightnessScale.toFixed(3)) + '
' + getMsg("time_elapsed") + (new Date() - drawBeginTime) + '
' + getMsg("force_stopped"); forceStop = false; } else if (hasExceededTime) @@ -642,7 +642,7 @@ function shootWaitingRays() { } else { - document.getElementById('simulatorStatus').innerHTML = getMsg("ray_count") + shotRayCount + '
' + getMsg("total_truncation") + totalTruncation.toFixed(3) + '
' + getMsg("time_elapsed") + (new Date() - drawBeginTime); + document.getElementById('simulatorStatus').innerHTML = getMsg("ray_count") + shotRayCount + '
' + getMsg("total_truncation") + totalTruncation.toFixed(3) + '
' + getMsg("brightness_scale") + ((brightnessScale <= 0) ? "-" : brightnessScale.toFixed(3)) + '
' + getMsg("time_elapsed") + (new Date() - drawBeginTime); } document.getElementById('forceStop').style.display = 'none'; //ctx.stroke(); diff --git a/simulator/locales/de.js b/simulator/locales/de.js index a3266349..65e19158 100644 --- a/simulator/locales/de.js +++ b/simulator/locales/de.js @@ -791,6 +791,10 @@ locales["de"] = { "tool_Detector_popover": { "message": "Ein Messwerkzeug für Energieflussrate (P), der Rate des senkrechten Impulsflusses (F∩) und der Rate des parallelen Impulsflusses (F∥) durch ein Segment. (Ziehen oder Klicken zum Erzeugen.) Die Einheiten sind willkürlich." }, + "tool_Detector_info_popover": { + "incomplete": true, + "message": "" + }, "tool_TextLabel_popover": { "message": "Ein Text-Label." }, @@ -905,6 +909,10 @@ locales["de"] = { "incomplete": true, "message": "Truncated brightness: " }, + "brightness_scale": { + "incomplete": true, + "message": "Brightness Scale: " + }, "time_elapsed": { "incomplete": true, "message": "Time elapsed (ms): " diff --git a/simulator/locales/en.js b/simulator/locales/en.js index c10f9304..0eece80c 100644 --- a/simulator/locales/en.js +++ b/simulator/locales/en.js @@ -702,6 +702,9 @@ locales["en"] = { "tool_Detector_popover": { "message": "A tool for measuring the rate of energy flow (P), the rate of perpendicular momentum flow (F⊥), and the rate of parallel momentum flow (F∥) through a line segment. (Drag or click to create the line segment.) The units are arbitrary." }, + "tool_Detector_info_popover": { + "message": "" + }, "tool_TextLabel_popover": { "message": "A text label." }, @@ -795,6 +798,9 @@ locales["en"] = { "total_truncation": { "message": "Truncated brightness: " }, + "brightness_scale": { + "message": "Brightness Scale: " + }, "time_elapsed": { "message": "Time elapsed (ms): " }, diff --git a/simulator/locales/es.js b/simulator/locales/es.js index c49882a7..30ce1530 100644 --- a/simulator/locales/es.js +++ b/simulator/locales/es.js @@ -726,6 +726,10 @@ locales["es"] = { "tool_Detector_popover": { "message": "Una herramienta para medir el flujo de energía (P), el momento perpendicular de flujo (F⊥), y el momento paralelo de flujo (F∥) a través de un segmento de recta. (Arrastre o clique para crear el segmento de recta.) Las unidades son arbitrarias." }, + "tool_Detector_info_popover": { + "incomplete": true, + "message": "" + }, "tool_TextLabel_popover": { "message": "Un cuadro de texto." }, @@ -826,6 +830,10 @@ locales["es"] = { "total_truncation": { "message": "Brillo truncado: " }, + "brightness_scale": { + "incomplete": true, + "message": "Brightness Scale: " + }, "time_elapsed": { "message": "Tiempo transcurrido (ms): " }, diff --git a/simulator/locales/fr.js b/simulator/locales/fr.js index b821164d..6c2e877b 100644 --- a/simulator/locales/fr.js +++ b/simulator/locales/fr.js @@ -837,6 +837,10 @@ locales["fr"] = { "incomplete": true, "message": "A tool for measuring the rate of energy flow (P), the rate of perpendicular momentum flow (F⊥), and the rate of parallel momentum flow (F∥) through a line segment. (Drag or click to create the line segment.) The units are arbitrary." }, + "tool_Detector_info_popover": { + "incomplete": true, + "message": "" + }, "tool_TextLabel_popover": { "message": "Une légende, pour un objet quelconque." }, @@ -954,6 +958,10 @@ locales["fr"] = { "incomplete": true, "message": "Truncated brightness: " }, + "brightness_scale": { + "incomplete": true, + "message": "Brightness Scale: " + }, "time_elapsed": { "incomplete": true, "message": "Time elapsed (ms): " diff --git a/simulator/locales/ja.js b/simulator/locales/ja.js index 60468c10..7e9f2d97 100644 --- a/simulator/locales/ja.js +++ b/simulator/locales/ja.js @@ -934,6 +934,10 @@ locales["ja"] = { "incomplete": false, "message": "線分を通るエネルギー流の速度 (P)、垂直運動量流の速度 (F⊥)、および平行運動量流の速度 (F∥) を測定するためのツールです。 (ドラッグまたはクリックで線分を作成します。)単位は任意です。" }, + "tool_Detector_info_popover": { + "incomplete": true, + "message": "" + }, "tool_TextLabel_popover": { "incomplete": false, "message": "テキストラベル." @@ -1058,6 +1062,10 @@ locales["ja"] = { "incomplete": true, "message": "Truncated brightness: " }, + "brightness_scale": { + "incomplete": true, + "message": "Brightness Scale: " + }, "time_elapsed": { "incomplete": true, "message": "Time elapsed (ms): " diff --git a/simulator/locales/ko.js b/simulator/locales/ko.js index cac4dd02..892bb9d5 100644 --- a/simulator/locales/ko.js +++ b/simulator/locales/ko.js @@ -934,6 +934,10 @@ locales["ko"] = { "incomplete": false, "message": "선분을 통해 전달되는 에너지 흐름 (P), 수직 방향 momentum flow (F⊥), 평행 방향 memontum flow (F∥) 을 측정하는 도구입니다. 단위는 임의값 (A.U.) 입니다.." }, + "tool_Detector_info_popover": { + "incomplete": true, + "message": "" + }, "tool_TextLabel_popover": { "incomplete": false, "message": "텍스트 추가" @@ -1058,6 +1062,10 @@ locales["ko"] = { "incomplete": true, "message": "Truncated brightness: " }, + "brightness_scale": { + "incomplete": true, + "message": "Brightness Scale: " + }, "time_elapsed": { "incomplete": true, "message": "Time elapsed (ms): " diff --git a/simulator/locales/nl.js b/simulator/locales/nl.js index dd4dabb5..7f7c48f0 100644 --- a/simulator/locales/nl.js +++ b/simulator/locales/nl.js @@ -852,6 +852,10 @@ locales["nl"] = { "incomplete": true, "message": "A tool for measuring the rate of energy flow (P), the rate of perpendicular momentum flow (F⊥), and the rate of parallel momentum flow (F∥) through a line segment. (Drag or click to create the line segment.) The units are arbitrary." }, + "tool_Detector_info_popover": { + "incomplete": true, + "message": "" + }, "tool_TextLabel_popover": { "incomplete": true, "message": "A text label." @@ -970,6 +974,10 @@ locales["nl"] = { "incomplete": true, "message": "Truncated brightness: " }, + "brightness_scale": { + "incomplete": true, + "message": "Brightness Scale: " + }, "time_elapsed": { "incomplete": true, "message": "Time elapsed (ms): " diff --git a/simulator/locales/pl.js b/simulator/locales/pl.js index c610be47..d1226a0e 100644 --- a/simulator/locales/pl.js +++ b/simulator/locales/pl.js @@ -744,6 +744,10 @@ locales["pl"] = { "tool_Detector_popover": { "message": "Narzędzie do pomiaru szybkości przepływu energii (P), szybkości prostopadłego przepływu pędu (F⊥), i szybkości równoległego przepływu pędu (F∥) przez odcinek. (Przeciągnij lub kliknij, aby utworzyć odcinek). Jednostki są umowne." }, + "tool_Detector_info_popover": { + "incomplete": true, + "message": "" + }, "tool_TextLabel_popover": { "message": "Etykieta tekstowa." }, @@ -849,6 +853,10 @@ locales["pl"] = { "incomplete": true, "message": "Truncated brightness: " }, + "brightness_scale": { + "incomplete": true, + "message": "Brightness Scale: " + }, "time_elapsed": { "incomplete": true, "message": "Time elapsed (ms): " diff --git a/simulator/locales/pt_BR.js b/simulator/locales/pt_BR.js index 5dc226e8..60a21010 100644 --- a/simulator/locales/pt_BR.js +++ b/simulator/locales/pt_BR.js @@ -745,6 +745,10 @@ locales["pt-BR"] = { "incomplete": true, "message": "A tool for measuring the rate of energy flow (P), the rate of perpendicular momentum flow (F⊥), and the rate of parallel momentum flow (F∥) through a line segment. (Drag or click to create the line segment.) The units are arbitrary." }, + "tool_Detector_info_popover": { + "incomplete": true, + "message": "" + }, "tool_TextLabel_popover": { "incomplete": true, "message": "A text label." @@ -855,6 +859,10 @@ locales["pt-BR"] = { "total_truncation": { "message": "Brilho truncado: " }, + "brightness_scale": { + "incomplete": true, + "message": "Brightness Scale: " + }, "time_elapsed": { "message": "Tempo decorrido (ms): " }, diff --git a/simulator/locales/ru.js b/simulator/locales/ru.js index b36a1850..506c900f 100644 --- a/simulator/locales/ru.js +++ b/simulator/locales/ru.js @@ -840,6 +840,10 @@ locales["ru"] = { "incomplete": true, "message": "A tool for measuring the rate of energy flow (P), the rate of perpendicular momentum flow (F⊥), and the rate of parallel momentum flow (F∥) through a line segment. (Drag or click to create the line segment.) The units are arbitrary." }, + "tool_Detector_info_popover": { + "incomplete": true, + "message": "" + }, "tool_TextLabel_popover": { "incomplete": true, "message": "A text label." @@ -958,6 +962,10 @@ locales["ru"] = { "incomplete": true, "message": "Truncated brightness: " }, + "brightness_scale": { + "incomplete": true, + "message": "Brightness Scale: " + }, "time_elapsed": { "incomplete": true, "message": "Time elapsed (ms): " diff --git a/simulator/locales/si.js b/simulator/locales/si.js index 1d0b14e4..a5a812c8 100644 --- a/simulator/locales/si.js +++ b/simulator/locales/si.js @@ -743,6 +743,10 @@ locales["si"] = { "tool_Detector_popover": { "message": "ශක්ති ප්‍රවාහයේ වේගය (P), ලම්බක ගම්‍යතා ප්‍රවාහයේ වේගය (F⊥) සහ රේඛා ඛණ්ඩයක් හරහා සමාන්තර ගම්‍යතා ප්‍රවාහයේ වේගය (F∥) මැනීම සඳහා මෙවලමකි. (රේඛා ඛණ්ඩය සෑදීමට අදින්න හෝ ක්ලික් කරන්න.)" }, + "tool_Detector_info_popover": { + "incomplete": true, + "message": "" + }, "tool_TextLabel_popover": { "incomplete": true, "message": "A text label." @@ -844,6 +848,10 @@ locales["si"] = { "total_truncation": { "message": "කපා දැමූ දීප්තිය: " }, + "brightness_scale": { + "incomplete": true, + "message": "Brightness Scale: " + }, "time_elapsed": { "message": "ගතවූ කාලය (ms): " }, diff --git a/simulator/locales/template.js b/simulator/locales/template.js index 9fdfa4c6..cf05bf1d 100644 --- a/simulator/locales/template.js +++ b/simulator/locales/template.js @@ -935,6 +935,10 @@ locales["LOCALE_ID"] = { "incomplete": true, "message": "A tool for measuring the rate of energy flow (P), the rate of perpendicular momentum flow (F⊥), and the rate of parallel momentum flow (F∥) through a line segment. (Drag or click to create the line segment.) The units are arbitrary." }, + "tool_Detector_info_popover": { + "incomplete": true, + "message": "" + }, "tool_TextLabel_popover": { "incomplete": true, "message": "A text label." @@ -1059,6 +1063,10 @@ locales["LOCALE_ID"] = { "incomplete": true, "message": "Truncated brightness: " }, + "brightness_scale": { + "incomplete": true, + "message": "Brightness Scale: " + }, "time_elapsed": { "incomplete": true, "message": "Time elapsed (ms): " diff --git a/simulator/locales/zh_CN.js b/simulator/locales/zh_CN.js index f313daf9..078cc860 100644 --- a/simulator/locales/zh_CN.js +++ b/simulator/locales/zh_CN.js @@ -702,6 +702,9 @@ locales["zh-CN"] = { "tool_Detector_popover": { "message": "测量通过一线段的能量流率(P)、垂直动量流率(F⊥)与水平动量流率(F∥)。(拖曳或点击以创建该线段。)单位为任意。" }, + "tool_Detector_info_popover": { + "message": "" + }, "tool_TextLabel_popover": { "message": "文字标签。" }, @@ -795,6 +798,9 @@ locales["zh-CN"] = { "total_truncation": { "message": "被截断的亮度:" }, + "brightness_scale": { + "message": "亮度尺度:" + }, "time_elapsed": { "message": "花费时间(ms):" }, diff --git a/simulator/locales/zh_TW.js b/simulator/locales/zh_TW.js index bd203ddf..ec524428 100644 --- a/simulator/locales/zh_TW.js +++ b/simulator/locales/zh_TW.js @@ -702,6 +702,9 @@ locales["zh-TW"] = { "tool_Detector_popover": { "message": "測量通過一線段的能量流率(P)、垂直動量流率(F⊥)與水平動量流率(F∥)。(拖曳或點擊以創建該線段。)單位為任意。" }, + "tool_Detector_info_popover": { + "message": "" + }, "tool_TextLabel_popover": { "message": "文字標籤。" }, @@ -795,6 +798,9 @@ locales["zh-TW"] = { "total_truncation": { "message": "被截斷的亮度:" }, + "brightness_scale": { + "message": "亮度尺度:" + }, "time_elapsed": { "message": "花費時間(ms):" },