mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
17 lines
360 B
CoffeeScript
17 lines
360 B
CoffeeScript
$ = require 'jquery'
|
|
|
|
$.fn.scrollBottom = (newValue) ->
|
|
if newValue?
|
|
@scrollTop(newValue - @height())
|
|
else
|
|
@scrollTop() + @height()
|
|
|
|
$.fn.scrollRight = (newValue) ->
|
|
if newValue?
|
|
@scrollLeft(newValue - @width())
|
|
else
|
|
@scrollLeft() + @width()
|
|
|
|
$.fn.containsElement = (element) ->
|
|
(element[0].compareDocumentPosition(this[0]) & 8) == 8
|