mirror of
https://github.com/atom/atom.git
synced 2026-01-23 13:58:08 -05:00
20 lines
636 B
CoffeeScript
20 lines
636 B
CoffeeScript
{View} = require './space-pen-extensions'
|
|
|
|
# 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`.
|
|
#
|
|
# FIXME: I don't actually understand if this is useful or not. I think it is
|
|
# a base of package widgets but I don't really understand how the core events
|
|
# work.
|
|
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()
|