fstiewitz / build-tools-cpp

Build your projects in atom
https://atom.io/packages/build-tools
MIT License
31 stars 6 forks source link

resize is a little "funky" #14

Closed virtualthoughts closed 9 years ago

virtualthoughts commented 9 years ago

So i've noticed that when you click to resize the output window it "jumps" above the mouse by the amount that the command output window is offset from the bottom of the screen... Attempt to do it with and without a find window open at the bottom of the window.

In any case here is the code to fix it:

  startResize: (e) => # pass in the mousedown event
    $(document).on 'mousemove', @resize
    $(document).on 'mouseup', @endResize
    @padding = $(document.body).height() - (e.clientY + @find('.commandoutput').height()) # calculate padding offset

  resize: ({pageY, which}) =>
    return @endResize() unless which is 1
    cmdOutput = @find('.commandoutput')
    @find('.commandoutput').height($(document.body).height() - pageY - @padding) #includes padding offset
fstiewitz commented 9 years ago

Thank you for the fix but a pull request would have been nicer :)

virtualthoughts commented 9 years ago

Sorry I'm a bit of a Git newbie (long time svn user)... I will do some reading as to how to do the above ;-)