     @editorStyles.push linesBg
     @applyConfToEditor linesBg
     ed = editor.editor
-    console.log editor
     @editor.lineHeight = ed.getLineHeightInPixels()
-    blurContainer = document.createElement 'div'
-    blurContainer.setAttribute 'class','blurContainer'
-    editor.element.insertBefore blurContainer,editor.element.firstChild
-    #ed.onDidChange (e)=> @editorChanged.apply @,[e,editor]
-    #setTimeout (=>@editorChanged.apply @,[editor]),2000
-
+    ed.onDidChange (e)=> @drawTextBackground.apply @,[e,editor]
+    ed.onDidChangeScrollTop (e)=> @drawTextBackground.apply @,[{scrollTop:e},editor]
+    ed.onDidChangeScrollLeft (e)=> @drawTextBackground.apply @,[{scrollLeft:e},editor]
 
 
   watchEditors: ->
     atom.workspaceView.eachEditorView (editor) => @watchEditor.apply @,[editor]
 
+
+  setCanvasSize: (w,h)->
+    @frontBuffer.style.width  = w + "px"
+    @frontBuffer.style.height = h + "px"
+    @frontBuffer.width = w
+    @frontBuffer.height = h
+    @backBuffer.style.width  = w + "px"
+    @backBuffer.style.height = h + "px"
+    @backBuffer.width = w
+    @backBuffer.height = h
+    @frontContext.clearRect( 0, 0, w, h )
+    @backContext.clearRect( 0, 0, w, h )
+
+  initCanvas: (w,h) ->
+    @frontBuffer = document.createElement 'canvas'
+    @backBuffer = document.createElement 'canvas'
+    @frontContext = @frontBuffer.getContext("2d")
+    @backContext = @backBuffer.getContext("2d")
+    @textBackground = document.createElement 'div'
+    @textBackground.id = 'editor-background-text'
+    @textBackground.style.cssText="
+      position:absolute;
+      left:70px;
+      top:34px;
+      -webkit-filter:blur(15px);
+    "
+    @textBackground.appendChild @frontBuffer
+    body = document.querySelector 'body'
+    atomWorkspace = document.querySelector 'atom-workspace'
+    body.insertBefore @textBackground,atomWorkspace
 
   initialize: ->
     @elements.body = qr 'body'

      if conf.boxDepth>0 then @updateBox() else @updateBgPos()


  activateMouseMove: ->
    body = document.querySelector 'body'
    body.addEventListener 'mousemove',(ev) =>  @mouseMove.apply @,[ev]

  applyConfToEditor:(style) ->
    conf = atom.config.get 'editor-background'
    rgb=colorToArray conf.textBackground.toRGBAString()
    opacity = (conf.textBackgroundOpacity / 100).toFixed(2)

          background:rgba(#{rgba});
          position:relative;
        }
        /*
        .line>span:before{
          content:'';
          opacity:#{opacity};
