From bf22cd163844115e597581ec20118b349dc1feed Mon Sep 17 00:00:00 2001 From: Matt Pass Date: Sat, 16 Mar 2013 10:42:26 +0000 Subject: [PATCH] Now considering depth on highlight nest Made this chunk of code active by removing 1==2 condition. Now also defining 3 events in a variable and applying to text section and arrow start ends. Also needed cursor: pointer. --- lib/ice-coder.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 3ac264b..2e6d4fe 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -309,7 +309,7 @@ var ICEcoder = { cursor.findPrevious(); searchPos.ch = cursor.from().ch; searchPos.line = cursor.from().line; - if (i==nestPos && 1==2) { + if (i==nestPos) { cursorX = cM.getSearchCursor(">",searchPos); cursorX.findNext(); searchPosX = new Object(); @@ -974,7 +974,7 @@ var ICEcoder = { // Work out the nesting depth location on demand and update our display if required getNestLocation: function(updateNestDisplay) { - var cM, nestCheck, state, cx, startPos, fileName; + var cM, nestCheck, state, cx, startPos, fileName, events; cM = ICEcoder.getcMInstance(); nestCheck = cM.getValue(); @@ -1006,11 +1006,12 @@ var ICEcoder = { // Then for all the array items, output as the nest display for (var i=0;i'+ICEcoder.htmlTagArray[i]+''; + events = 'onMouseover="top.ICEcoder.highlightBlock('+i+')" onMouseout="top.ICEcoder.highlightBlock('+i+',\'hide\')" onClick="top.ICEcoder.setPosition('+i+',top.ICEcoder.startPosLine,\''+ICEcoder.htmlTagArray[i]+'\')"'; + if (i==0) {ICEcoder.nestDisplay.innerHTML += '
'}; + ICEcoder.nestDisplay.innerHTML += ''+ICEcoder.htmlTagArray[i]+''; ICEcoder.nestDisplay.innerHTML += i' - : '
'; + ? '
' + : '
'; } } }