     if bgSize=='manual' then bgSize=conf.manualBackgroundSize
     if bgSize=='original' then bgSize='auto'
     body = qr 'body'
-    x=body.style.width - @mouseX
-    y=@mouseY
+    factor = conf.mouseFactor
+    polowaX = body.clientWidth // 2
+    polowaY = body.clientHeight // 2
+    offsetX =  @mouseX - polowaX
+    offsetY =  @mouseY - polowaY
+    x = polowaX + (offsetX // factor)
+    y = polowaY + (offsetY // factor)
     boxCss="
     .eb-box-wrapper{
       perspective:1000px;
-      perspective-origin:50% 50%;
+      perspective-origin:#{x}px #{y}px;
       position:fixed;
       top:0;
       left:0;


      @colors.workspaceBgColor=style(@elements.editor).backgroundColor
      @colors.treeOriginalRGB=style(@elements.treeView).backgroundColor
      console.log @colors
      @packagesLoaded = true
      @applyBackground.apply @
    else
      setTimeout (=>@initialize.apply @),1000


  updateBox: (depth) ->
    depth2 = depth // 2
    conf=atom.config.get('editor-background')
    background=conf.imageURL
    opacity=(conf.boxOpacity / 100).toFixed(2)
    range=conf.boxRange

      default:true
      desctiption:"Transparent background under file tabs"
      order:7
    mouseFactor:
      type:"integer"
      default: 4
      description: "move background with mouse (higher value = slower)"
      order:8
    textShadow:
      type:"string"
      #default:"0px 5px 2px rgba(0, 0, 0, 0.52)"
      default:"0px 0px 1px rgba(0,0,0,1),0px 0px 3px #000,0px 0px 3px #000"
      description:"Add a little text shadow to code"
      order:9
    style:
      type:"string"
      default:"background:radial-gradient(rgba(0,0,0,0) 30%,rgba(0,0,0,0.75));"
      description:"Your custom css rules :]"
      order:10
    boxDepth:
      type:"integer"
      default: 500
