]>
Commit | Line | Data |
---|---|---|
1 | (function() { | |
2 | var ScrollView, View, | |
3 | __hasProp = {}.hasOwnProperty, | |
4 | __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; | |
5 | ||
6 | View = require('space-pen').View; | |
7 | ||
8 | module.exports = ScrollView = (function(_super) { | |
9 | __extends(ScrollView, _super); | |
10 | ||
11 | function ScrollView() { | |
12 | return ScrollView.__super__.constructor.apply(this, arguments); | |
13 | } | |
14 | ||
15 | ScrollView.prototype.initialize = function() { | |
16 | return atom.commands.add(this.element, { | |
17 | 'core:move-up': (function(_this) { | |
18 | return function() { | |
19 | return _this.scrollUp(); | |
20 | }; | |
21 | })(this), | |
22 | 'core:move-down': (function(_this) { | |
23 | return function() { | |
24 | return _this.scrollDown(); | |
25 | }; | |
26 | })(this), | |
27 | 'core:page-up': (function(_this) { | |
28 | return function() { | |
29 | return _this.pageUp(); | |
30 | }; | |
31 | })(this), | |
32 | 'core:page-down': (function(_this) { | |
33 | return function() { | |
34 | return _this.pageDown(); | |
35 | }; | |
36 | })(this), | |
37 | 'core:move-to-top': (function(_this) { | |
38 | return function() { | |
39 | return _this.scrollToTop(); | |
40 | }; | |
41 | })(this), | |
42 | 'core:move-to-bottom': (function(_this) { | |
43 | return function() { | |
44 | return _this.scrollToBottom(); | |
45 | }; | |
46 | })(this) | |
47 | }); | |
48 | }; | |
49 | ||
50 | return ScrollView; | |
51 | ||
52 | })(View); | |
53 | ||
54 | }).call(this); |