From 2a84d147f073e8e7126fca99452a6a6d4cdd6f9e Mon Sep 17 00:00:00 2001 From: Bridger Maxwell Date: Fri, 17 Aug 2012 20:22:28 -0400 Subject: [PATCH] Fixed a sizing bug in circuit editor. --- common/static/js/vendor/CodeMirror/mitx_markdown.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/static/js/vendor/CodeMirror/mitx_markdown.js b/common/static/js/vendor/CodeMirror/mitx_markdown.js index 2157f75fac..92dd589b0e 100644 --- a/common/static/js/vendor/CodeMirror/mitx_markdown.js +++ b/common/static/js/vendor/CodeMirror/mitx_markdown.js @@ -1,5 +1,7 @@ var schematic_height = 220; var schematic_width = 400; +var styling_height_delta = 2; //How many pixels are added to the height of the box because of styling (like a shadow) +var styling_width_delta = 2; var schematic_editor_height = 300; var schematic_editor_width = 500; @@ -121,7 +123,7 @@ CodeMirror.defineMode("mitx_markdown", function(cmCfg, modeCfg) { return html; }, size: function(text) { - return {width: schematic_width, height:schematic_height}; + return {width: schematic_width + styling_width_delta, height:schematic_height + styling_height_delta}; }, callback: function(node, line) { try {