mirror of
https://github.com/atom/atom.git
synced 2026-02-05 12:15:07 -05:00
16 lines
458 B
CoffeeScript
16 lines
458 B
CoffeeScript
{View} = require 'space-pen'
|
|
|
|
# Public: Represents a view that scrolls.
|
|
#
|
|
# This `View` subclass listens to events such as `page-up`, `page-down`,
|
|
# `move-to-top`, and `move-to-bottom`.
|
|
module.exports =
|
|
class ScrollView extends View
|
|
|
|
# Internal: The constructor.
|
|
initialize: ->
|
|
@on 'core:page-up', => @pageUp()
|
|
@on 'core:page-down', => @pageDown()
|
|
@on 'core:move-to-top', => @scrollToTop()
|
|
@on 'core:move-to-bottom', => @scrollToBottom()
|