crmMonaco - Accept option to specify relative height
authorTim Otten <totten@civicrm.org>
Wed, 16 Jun 2021 10:20:33 +0000 (03:20 -0700)
committerTim Otten <totten@civicrm.org>
Tue, 6 Jul 2021 21:34:18 +0000 (14:34 -0700)
ang/crmMonaco.js

index 15ff3747d4473ce9bdb605d9912dab50bbac1525..156753a0b773e2368aac518b1358d7aa680c8c52 100644 (file)
@@ -41,6 +41,9 @@
             }
           });
 
+          heightPct = options.crmHeightPct || heightPct;
+          delete options.crmHeightPct;
+
           var editorEl = $el.find('.crm-monaco-container');
           editorEl.css({height: Math.round(heightPct * $(window).height())});
           editor = monaco.editor.create(editorEl[0], options);