Skip to content
Snippets Groups Projects
Commit 0a7d1cb0 authored by Christopher Willis-Ford's avatar Christopher Willis-Ford
Browse files

Add comment explaining `getLabelForOpcode` use

parent ce629bc4
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment