From 0a7d1cb03b40927f70b0886c6408ed3057ab30fe Mon Sep 17 00:00:00 2001
From: Christopher Willis-Ford <cwillisf@media.mit.edu>
Date: Wed, 12 Sep 2018 16:50:16 -0400
Subject: [PATCH] Add comment explaining `getLabelForOpcode` use

---
 src/lib/monitor-adapter.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/monitor-adapter.js b/src/lib/monitor-adapter.js
index 3f9b199d7..be0b1db71 100644
--- a/src/lib/monitor-adapter.js
+++ b/src/lib/monitor-adapter.js
@@ -15,6 +15,8 @@ const isUndefined = a => typeof a === 'undefined';
  * @return {object} The adapted monitor with label and category
  */
 export default function ({id, spriteName, opcode, params, value, vm}) {
+    // Extension monitors get their labels from the Runtime through `getLabelForOpcode`.
+    // Other monitors' labels are hard-coded in `OpcodeLabels`.
     let {label, category, labelFn} = (vm && vm.runtime.getLabelForOpcode(opcode)) || OpcodeLabels(opcode);
 
     // Use labelFn if provided for dynamic labelling (e.g. variables)
-- 
GitLab