From 14ab734c966bc29ab1d71aefb08ec83b1168af3c Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Tue, 14 Oct 2014 17:47:42 +0100 Subject: [PATCH] diffNone class and renderLine event added diffNone added as an empty class to allow a line re-render as it's added renderLine event added, passing vars onto function in JS file --- editor.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/editor.php b/editor.php index d77c46f..2f4a81e 100644 --- a/editor.php +++ b/editor.php @@ -64,6 +64,7 @@ h2 {color: rgba(0,198,255,0.7)} .diffGreen {background: #0b0 !important; color: #fff !important} .diffRed {background: #800 !important; color: #fff !important} .diffGrey {background: #888 !important; color: #fff !important} +.diffNone {} @@ -229,6 +230,10 @@ function createNewCMInstance(num) { window['cM'+num] .on("inputRead", function(thisCM) {top.ICEcoder.cMonInputRead(thisCM,'cM'+num)}); window['cM'+num+'diff'] .on("inputRead", function(thisCM) {top.ICEcoder.cMonInputRead(thisCM,'cM'+num+'diff')}); + // Render line + window['cM'+num] .on("renderLine", function(thisCM, line, element) {top.ICEcoder.cMonRenderLine(thisCM,'cM'+num,line,element)}); + window['cM'+num+'diff'] .on("renderLine", function(thisCM, line, element) {top.ICEcoder.cMonRenderLine(thisCM,'cM'+num+'diff',line,element)}); + // Now create the active lines for them top.ICEcoder['cMActiveLinecM'+num] = window['cM'+num].addLineClass(0, "background", "cm-s-activeLine"); top.ICEcoder['cMActiveLinecM'+num+'diff'] = window['cM'+num+'diff'].addLineClass(0, "background", "cm-s-activeLine");