aboutsummaryrefslogtreecommitdiff
path: root/atom/packages/ex-mode/node_modules/atom-space-pen-views/lib/scroll-view.js
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2015-07-10 11:12:25 -0500
committerBen Beltran <ben@nsovocal.com>2015-07-10 11:12:25 -0500
commit24c7594d62d8d7fbbcdb64b11ce4adc5d8e6991a (patch)
treeded312222bb108923da1820ba40b04d710d20e5b /atom/packages/ex-mode/node_modules/atom-space-pen-views/lib/scroll-view.js
parenteb786e82d170e2abc351a432ade616d6ecdeeb6b (diff)
Adds atom
Diffstat (limited to 'atom/packages/ex-mode/node_modules/atom-space-pen-views/lib/scroll-view.js')
-rw-r--r--atom/packages/ex-mode/node_modules/atom-space-pen-views/lib/scroll-view.js54
1 files changed, 54 insertions, 0 deletions
diff --git a/atom/packages/ex-mode/node_modules/atom-space-pen-views/lib/scroll-view.js b/atom/packages/ex-mode/node_modules/atom-space-pen-views/lib/scroll-view.js
new file mode 100644
index 0000000..b77ad49
--- /dev/null
+++ b/atom/packages/ex-mode/node_modules/atom-space-pen-views/lib/scroll-view.js
@@ -0,0 +1,54 @@
+(function() {
+ var ScrollView, View,
+ __hasProp = {}.hasOwnProperty,
+ __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; };
+
+ View = require('space-pen').View;
+
+ module.exports = ScrollView = (function(_super) {
+ __extends(ScrollView, _super);
+
+ function ScrollView() {
+ return ScrollView.__super__.constructor.apply(this, arguments);
+ }
+
+ ScrollView.prototype.initialize = function() {
+ return atom.commands.add(this.element, {
+ 'core:move-up': (function(_this) {
+ return function() {
+ return _this.scrollUp();
+ };
+ })(this),
+ 'core:move-down': (function(_this) {
+ return function() {
+ return _this.scrollDown();
+ };
+ })(this),
+ 'core:page-up': (function(_this) {
+ return function() {
+ return _this.pageUp();
+ };
+ })(this),
+ 'core:page-down': (function(_this) {
+ return function() {
+ return _this.pageDown();
+ };
+ })(this),
+ 'core:move-to-top': (function(_this) {
+ return function() {
+ return _this.scrollToTop();
+ };
+ })(this),
+ 'core:move-to-bottom': (function(_this) {
+ return function() {
+ return _this.scrollToBottom();
+ };
+ })(this)
+ });
+ };
+
+ return ScrollView;
+
+ })(View);
+
+}).call(this);