5 // classes : |
5 // classes : |
6 // c-s is for 'textnode wrapper span' |
6 // c-s is for 'textnode wrapper span' |
7 // c-c is a comment marker |
7 // c-c is a comment marker |
8 |
8 |
9 paintCommentScope = function(comment) { |
9 paintCommentScope = function(comment) { |
10 if (comment.reply_to_id == null) { |
10 if (comment.reply_to_id == null && comment['start_wrapper'] != -1) { |
11 var selection = { 'start' : { 'elt' : document.getElementById("sv_"+comment['start_wrapper']), 'offset' : comment['start_offset'] }, |
11 var selection = { 'start' : { 'elt' : document.getElementById("sv_"+comment['start_wrapper']), 'offset' : comment['start_offset'] }, |
12 'end' : { 'elt' : document.getElementById("sv_"+comment['end_wrapper']), 'offset' : comment['end_offset'] } |
12 'end' : { 'elt' : document.getElementById("sv_"+comment['end_wrapper']), 'offset' : comment['end_offset'] } |
13 } ; |
13 } ; |
14 if (document.getElementById("sv_"+comment['start_wrapper'])== null) |
14 if (document.getElementById("sv_"+comment['start_wrapper'])== null) { |
15 warn_server({'from':'paintCommentScope', 'start_wrapper':comment['start_wrapper']}) ; |
15 warn_server({'from':'paintCommentScope', 'start_wrapper':comment['start_wrapper']}) ; |
|
16 } |
16 else { |
17 else { |
17 if (document.getElementById("sv_"+comment['end_wrapper'])== null) |
18 if (document.getElementById("sv_"+comment['end_wrapper'])== null) |
18 warn_server({'from':'paintCommentScope', 'end_wrapper':comment['end_wrapper']}) ; |
19 warn_server({'from':'paintCommentScope', 'end_wrapper':comment['end_wrapper']}) ; |
19 else { |
20 else { |
20 selection['start'] = _convertSelectionFromCSToCC(selection['start']) ; |
21 selection['start'] = _convertSelectionFromCSToCC(selection['start']) ; |