Create ScrollView super class

Binds support for page up, page down, move to top,
and move to bottom in the initialize method.
This commit is contained in:
Kevin Sawicki
2012-10-12 08:47:48 -07:00
parent 9f6366f6c6
commit 5bf951d96f
6 changed files with 22 additions and 24 deletions

View File

@@ -0,0 +1,8 @@
{View} = require 'space-pen'
module.exports =
class ScrollView extends View
initialize: ->
@on 'core:page-up', => @pageUp()
@on 'core:page-down', => @pageDown()
@on 'core:move-to-top', => @scrollToTop()
@on 'core:move-to-bottom', => @scrollToBottom()