From 7eeb32ee3882c2a5837a95a2af60ea869ce9e5c8 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Fri, 18 Mar 2016 13:58:14 -0400 Subject: [PATCH] code cleanup: var/func renames --- editor.coffee | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/editor.coffee b/editor.coffee index 0d9d495..a932f16 100644 --- a/editor.coffee +++ b/editor.coffee @@ -889,7 +889,7 @@ class PeachHTML5Editor @cursor_el.parentNode.removeChild @cursor_el @cursor_visible = false @cursor = null - @matt null + @annotate null move_cursor: (cursor) -> @cursor = cursor unless @cursor_visible @@ -903,8 +903,8 @@ class PeachHTML5Editor height = cursor.h @cursor_el.style.top = "#{cursor.y + overlay_padding + Math.round(height * .07)}px" @cursor_el.style.height = "#{Math.round height * 0.82}px" - @matt cursor.n - matt: (n) -> + @annotate cursor.n + annotate: (n) -> while @matting.length > 0 @overlay.removeChild @matting[0] @matting.shift() @@ -920,12 +920,12 @@ class PeachHTML5Editor if bounds.x is prev_bounds.x and bounds.y is prev_bounds.y and bounds.w is prev_bounds.w and bounds.h is prev_bounds.h n = n.parent continue - matt = domify @outer_idoc, div: class: 'ann_box', style: "left: #{bounds.x - 1 + overlay_padding}px; top: #{bounds.y - 2 + overlay_padding}px; width: #{bounds.w}px; height: #{bounds.h}px" # outline: 1000px solid rgba(0,153,255,#{alpha}); - @overlay.appendChild matt - @matting.push matt - ann = domify @outer_idoc, div: class: 'ann_tag', style: "left: #{bounds.x + 1 + overlay_padding}px; top: #{bounds.y - 7 + overlay_padding}px", children: [domify @outer_idoc, text: " #{n.name} "] - @overlay.appendChild ann - @matting.push ann + ann_box = domify @outer_idoc, div: class: 'ann_box', style: "left: #{bounds.x - 1 + overlay_padding}px; top: #{bounds.y - 2 + overlay_padding}px; width: #{bounds.w}px; height: #{bounds.h}px" # outline: 1000px solid rgba(0,153,255,#{alpha}); + @overlay.appendChild ann_box + @matting.push ann_box + ann_tag = domify @outer_idoc, div: class: 'ann_tag', style: "left: #{bounds.x + 1 + overlay_padding}px; top: #{bounds.y - 7 + overlay_padding}px", children: [domify @outer_idoc, text: " #{n.name} "] + @overlay.appendChild ann_tag + @matting.push ann_tag n = n.parent alpha *= 1.5 pretty_html: (tree, indent = '', parent_flags = pre_ish: false, block: true, want_nl: false) -> -- 1.7.10.4