         wideScreenHeight = viewport / 2
 
         if @isWideScreen
+          @unsetWideScreen wideScreenHeight
+        else
           @setWideScreen wideScreenHeight
-        else
-          @unsetWideScreen wideScreenHeight
 
     @labelCSSContent = new KDLabelView
       title : "CSS Options"


    @codeShareContainer.showPane @codeShareResultPane

  setWideScreen:(wideScreenHeight)=>

          @$(".formline-codeshare").css "margin-left":"168px"
          @$(".formline-codeshare").css "margin-right":"0px"

          @isWideScreen = no
          @wideScreenBtn.setTitle "Increase Editor Size"

  setWideScreen:(wideScreenHeight)=>
          @$(".formline-codeshare").css "margin-left":"10px"
          @$(".formline-codeshare").css "margin-right":"10px"
          @$(".code-snip-container").css "max-width":"100%"
