Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc67c788d2 | ||
|
|
3f455f90d9 |
+17
-2
@@ -5,7 +5,21 @@
|
|||||||
* The bidirectional argument indicates, whether the terminal should
|
* The bidirectional argument indicates, whether the terminal should
|
||||||
* send data to the socket as well and is true, by default.
|
* send data to the socket as well and is true, by default.
|
||||||
*/
|
*/
|
||||||
Terminal.prototype.attach = function (socket, bidirectional) {
|
|
||||||
|
(function (attach) {
|
||||||
|
if (typeof define == 'function') {
|
||||||
|
/*
|
||||||
|
* Require.js is available
|
||||||
|
*/
|
||||||
|
define(['../../src/xterm'], attach);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* Plain browser environment
|
||||||
|
*/
|
||||||
|
attach(this.Xterm);
|
||||||
|
}
|
||||||
|
})(function (Xterm) {
|
||||||
|
Xterm.prototype.attach = function (socket, bidirectional) {
|
||||||
var term = this;
|
var term = this;
|
||||||
|
|
||||||
bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;
|
bidirectional = (typeof bidirectional == 'undefined') ? true : bidirectional;
|
||||||
@@ -20,4 +34,5 @@ Terminal.prototype.attach = function (socket, bidirectional) {
|
|||||||
socket.send(data);
|
socket.send(data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
});
|
||||||
+15
-1
@@ -11,7 +11,20 @@
|
|||||||
* terminal row and truncate its width with the current number
|
* terminal row and truncate its width with the current number
|
||||||
* of columns)
|
* of columns)
|
||||||
*/
|
*/
|
||||||
Terminal.prototype.fit = function () {
|
(function (fit) {
|
||||||
|
if (typeof define == 'function') {
|
||||||
|
/*
|
||||||
|
* Require.js is available
|
||||||
|
*/
|
||||||
|
define(['../../src/xterm'], fit);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* Plain browser environment
|
||||||
|
*/
|
||||||
|
fit(this.Xterm);
|
||||||
|
}
|
||||||
|
})(function (Xterm) {
|
||||||
|
Xterm.prototype.fit = function () {
|
||||||
var container = this.rowContainer,
|
var container = this.rowContainer,
|
||||||
subjectRow = this.rowContainer.firstElementChild,
|
subjectRow = this.rowContainer.firstElementChild,
|
||||||
rows,
|
rows,
|
||||||
@@ -43,3 +56,4 @@ Terminal.prototype.fit = function () {
|
|||||||
|
|
||||||
this.resize(cols, rows);
|
this.resize(cols, rows);
|
||||||
};
|
};
|
||||||
|
});
|
||||||
@@ -10,7 +10,20 @@
|
|||||||
* If the `fullscreen` argument has not been supplied, the
|
* If the `fullscreen` argument has not been supplied, the
|
||||||
* fullscreen mode is being toggled.
|
* fullscreen mode is being toggled.
|
||||||
*/
|
*/
|
||||||
Terminal.prototype.toggleFullscreen = function (fullscreen) {
|
(function (fullscreen) {
|
||||||
|
if (typeof define == 'function') {
|
||||||
|
/*
|
||||||
|
* Require.js is available
|
||||||
|
*/
|
||||||
|
define(['../../src/xterm'], fullscreen);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* Plain browser environment
|
||||||
|
*/
|
||||||
|
fullscreen(this.Xterm);
|
||||||
|
}
|
||||||
|
})(function (Xterm) {
|
||||||
|
Xterm.prototype.toggleFullscreen = function (fullscreen) {
|
||||||
var fn;
|
var fn;
|
||||||
|
|
||||||
if (typeof fullscreen == 'undefined') {
|
if (typeof fullscreen == 'undefined') {
|
||||||
@@ -22,4 +35,5 @@ Terminal.prototype.toggleFullscreen = function (fullscreen) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.element.classList[fn]('fullscreen');
|
this.element.classList[fn]('fullscreen');
|
||||||
}
|
};
|
||||||
|
});
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "xterm.js",
|
"name": "xterm.js",
|
||||||
"version": "0.16",
|
"version": "0.17",
|
||||||
"ignore": ["demo", "docs", "test", ".gitignore"]
|
"ignore": ["demo", "docs", "test", ".gitignore"]
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -51,9 +51,9 @@ copyright = u'2014, SourceLair Limited'
|
|||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '0.16'
|
version = '0.17'
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '0.16 Alpha'
|
release = '0.17 Alpha'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|||||||
+17
-13
@@ -31,8 +31,20 @@
|
|||||||
* other features.
|
* other features.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
;(function() {
|
(function (xterm) {
|
||||||
|
if (typeof define == 'function') {
|
||||||
|
/*
|
||||||
|
* Require.js is available
|
||||||
|
*/
|
||||||
|
define([], xterm);
|
||||||
|
} else {
|
||||||
|
/*
|
||||||
|
* Plain browser environment
|
||||||
|
*/
|
||||||
|
this.Xterm = xterm.call(this);
|
||||||
|
this.Terminal = this.Xterm; /* Backwards compatibility with term.js */
|
||||||
|
}
|
||||||
|
})(function() {
|
||||||
/**
|
/**
|
||||||
* Terminal Emulation References:
|
* Terminal Emulation References:
|
||||||
* http://vt100.net/
|
* http://vt100.net/
|
||||||
@@ -50,8 +62,7 @@
|
|||||||
* Shared
|
* Shared
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var window = this
|
var window = this, document = this.document;
|
||||||
, document = this.document;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* EventEmitter
|
* EventEmitter
|
||||||
@@ -4763,12 +4774,5 @@ Terminal.on = on;
|
|||||||
Terminal.off = off;
|
Terminal.off = off;
|
||||||
Terminal.cancel = cancel;
|
Terminal.cancel = cancel;
|
||||||
|
|
||||||
if (typeof module !== 'undefined') {
|
return Terminal;
|
||||||
module.exports = Terminal;
|
});
|
||||||
} else {
|
|
||||||
this.Terminal = Terminal;
|
|
||||||
}
|
|
||||||
|
|
||||||
}).call(function() {
|
|
||||||
return this || (typeof window !== 'undefined' ? window : global);
|
|
||||||
}());
|
|
||||||
Reference in New Issue
Block a user