]> git.proxmox.com Git - mirror_xterm.js.git/commitdiff
Merge pull request #308 from Tyriar/294_scroll
authorDaniel Imms <tyriar@tyriar.com>
Mon, 10 Oct 2016 15:33:09 +0000 (08:33 -0700)
committerGitHub <noreply@github.com>
Mon, 10 Oct 2016 15:33:09 +0000 (08:33 -0700)
Implement scrollPages, scrollToTop, scrollToBottom and add scroll tests

addons/attach/attach.js
addons/fit/fit.js
addons/fullscreen/fullscreen.js
addons/linkify/linkify.js
src/xterm.css
src/xterm.js
test/addons/linkify-test.js
test/addons/test.js

index 2ef1f7378c97bc69aa05d36537934c82e46343d5..b74627d19a3bd8197ac7218dd5d97ccfa62f3c7b 100644 (file)
     /*
      * CommonJS environment
      */
-    module.exports = attach(require('../../src/xterm'));
+    module.exports = attach(require('../../dist/xterm'));
   } else if (typeof define == 'function') {
     /*
      * Require.js is available
      */
-    define(['../../src/xterm'], attach);
+    define(['../../dist/xterm'], attach);
   } else {
     /*
      * Plain browser environment
index 209e0596439168cae8a2a4b1ac2fa169af0bf331..7657c9c47c50085de4e47566287ef200c1835491 100644 (file)
     /*
      * CommonJS environment
      */
-    module.exports = fit(require('../../src/xterm'));
+    module.exports = fit(require('../../dist/xterm'));
   } else if (typeof define == 'function') {
     /*
      * Require.js is available
      */
-    define(['../../src/xterm'], fit);
+    define(['../../dist/xterm'], fit);
   } else {
     /*
      * Plain browser environment
index 9a655b32bbc9bbfcf3e93cd2e6fe4abaa81e63d8..1579a9c28948526ad5b5c86be72155f79f3b0781 100644 (file)
     /*
      * CommonJS environment
      */
-    module.exports = fullscreen(require('../../src/xterm'));
+    module.exports = fullscreen(require('../../dist/xterm'));
   } else if (typeof define == 'function') {
     /*
      * Require.js is available
      */
-    define(['../../src/xterm'], fullscreen);
+    define(['../../dist/xterm'], fullscreen);
   } else {
     /*
      * Plain browser environment
index 746b4305b843d226e97027fb61bf60dc76273d2c..8ee9611c69cb5e3f662499959add5aaaa5c0255e 100644 (file)
@@ -3,12 +3,12 @@
     /*
      * CommonJS environment
      */
-    module.exports = linkify(require('../../src/xterm'));
+    module.exports = linkify(require('../../dist/xterm'));
   } else if (typeof define == 'function') {
     /*
      * Require.js is available
      */
-    define(['../../src/xterm'], linkify);
+    define(['../../dist/xterm'], linkify);
   } else {
     /*
      * Plain browser environment
index 435cf0eeb2b506974ea4e1431f9cb4606e69dd9f..bf1442dee6a12014c030c3f700801d4585845848 100644 (file)
@@ -61,6 +61,7 @@
     position: absolute;
     opacity: 0;
     left: -9999em;
+    top: -9999em;
     width: 0;
     height: 0;
     z-index: -10;
index fabde1795dc4e13da8c1069575507fc37b8d3c81..abf9618c796b781c316f25112215c2603d021c55 100644 (file)
@@ -642,7 +642,7 @@ Terminal.prototype.open = function(parent) {
 Terminal.loadAddon = function(addon, callback) {
   if (typeof exports === 'object' && typeof module === 'object') {
     // CommonJS
-    return require(__dirname + '/../addons/' + addon);
+    return require('../addons/' + addon);
   } else if (typeof define == 'function') {
     // RequireJS
     return require(['../addons/' + addon + '/' + addon], callback);
@@ -3121,9 +3121,9 @@ Terminal.prototype.is = function(term) {
 
 
 /**
    * Emit the 'data' event and populate the given data.
    * @param {string} data The data to populate in the event.
    */
+ * Emit the 'data' event and populate the given data.
+ * @param {string} data The data to populate in the event.
+ */
 Terminal.prototype.handler = function(data) {
   this.emit('data', data);
 };
@@ -4366,8 +4366,8 @@ Terminal.prototype.scrollUp = function(params) {
 
 
 /**
    * CSI Ps T  Scroll down Ps lines (default = 1) (SD).
    */
+ * CSI Ps T  Scroll down Ps lines (default = 1) (SD).
+ */
 Terminal.prototype.scrollDown = function(params) {
   var param = params[0] || 1;
   while (param--) {
index 7cb2318621f8127ca1f64b6878d0dae9f8307c18..ff871002982a80ae701c7cecdf7773c95ead3d37 100644 (file)
@@ -1,5 +1,5 @@
 var assert = require('chai').assert;
-var Terminal = require('../../src/xterm');
+var Terminal = require('../../dist/xterm');
 var linkify = require('../../addons/linkify/linkify');
 
 describe('linkify addon', function () {
index ba689e6e4beae061a69c2d236bc04c6df3919325..ddd79ff63901cafd83016d3ddacdc9e116a2eb8c 100644 (file)
@@ -1,10 +1,11 @@
 var assert = require('chai').assert;
 var Terminal = require('../../src/xterm');
+var distTerminal = require('../../dist/xterm');
 
 describe('xterm.js addons', function() {
   it('should load addons with Terminal.loadAddon', function () {
     Terminal.loadAddon('attach');
-    // Test that function was loaded successfully
-    assert.equal(typeof Terminal.prototype.attach, 'function');
+    // Test that addon was loaded successfully
+    assert.equal(typeof distTerminal.prototype.attach, 'function');
   });
 });