summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortimb <opuscule@gmail.com>2014-01-28 10:31:51 -0800
committertimb <opuscule@gmail.com>2014-01-28 10:31:51 -0800
commit50749723960eee4b15e3610e16931f5f579de29b (patch)
tree404ff10971112cb1645297032854e56b99d74eda
parente5e70c9b784d476ec64c18d9f04e890d17f63d66 (diff)
fix error position when scrolling shader-combo
-rw-r--r--js/error.highlight.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/error.highlight.js b/js/error.highlight.js
index f46d0ec..c2d3947 100644
--- a/js/error.highlight.js
+++ b/js/error.highlight.js
@@ -47,7 +47,7 @@ var reposition_highlight = function(){
dom.highlight.style.left = pos.left + "px"
var y_pos = pos.top + height_until_error - dom.textarea.scrollTop
- dom.highlight.style.top = y_pos + dom.html.scrollTop + "px"
+ dom.highlight.style.top = y_pos + dom.html.scrollTop + dom.body.scrollTop + "px"
var height_of_highlight = height_with_error;
@@ -132,6 +132,7 @@ var create_el_highlight = function(){
var init = function(){
dom.html = document.querySelector('html')
+ dom.body = document.querySelector('body')
calc_textarea_style()
create_el_highlight()
create_el_textmeasure()