From fddd411279f841835e449efe8a73939158c36eb1 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Fri, 28 Mar 2014 11:01:24 -0600 Subject: [PATCH] Use className instead of class Might as well go with the flow --- src/editor-component.coffee | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/editor-component.coffee b/src/editor-component.coffee index f260fa250..61ce387b0 100644 --- a/src/editor-component.coffee +++ b/src/editor-component.coffee @@ -3,18 +3,18 @@ {$$} = require 'space-pencil' DummyLineNode = $$ -> - @div class: 'line', style: 'position: absolute; visibility: hidden;', -> @span 'x' + @div className: 'line', style: 'position: absolute; visibility: hidden;', -> @span 'x' module.exports = React.createClass pendingScrollTop: null render: -> - div class: 'editor', - div class: 'scroll-view', ref: 'scrollView', - div class: 'overlayer' + div className: 'editor', + div className: 'scroll-view', ref: 'scrollView', + div className: 'overlayer' @renderVisibleLines() - div class: 'vertical-scrollbar', ref: 'verticalScrollbar', onScroll: @onVerticalScroll, + div className: 'vertical-scrollbar', ref: 'verticalScrollbar', onScroll: @onVerticalScroll, div outlet: 'verticalScrollbarContent', style: {height: @getScrollHeight()} renderVisibleLines: -> @@ -23,11 +23,11 @@ React.createClass lineCount = @props.editor.getScreenLineCount() followingHeight = (lineCount - endRow) * @state.lineHeight - div class: 'lines', ref: 'lines', style: {WebkitTransform: "translateY(#{-@state.scrollTop}px)"}, [ - div class: 'spacer', key: 'top-spacer', style: {height: precedingHeight} + div className: 'lines', ref: 'lines', style: {WebkitTransform: "translateY(#{-@state.scrollTop}px)"}, [ + div className: 'spacer', key: 'top-spacer', style: {height: precedingHeight} (for tokenizedLine in @props.editor.linesForScreenRows(startRow, endRow - 1) LineComponent({tokenizedLine, key: tokenizedLine.id}))... - div class: 'spacer', key: 'bottom-spacer', style: {height: followingHeight} + div className: 'spacer', key: 'bottom-spacer', style: {height: followingHeight} ] getInitialState: -> @@ -92,7 +92,7 @@ React.createClass LineComponent = React.createClass render: -> - div class: 'line', dangerouslySetInnerHTML: {__html: @buildInnerHTML()} + div className: 'line', dangerouslySetInnerHTML: {__html: @buildInnerHTML()} buildInnerHTML: -> if @props.tokenizedLine.text.length is 0