Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ede9ee416a | ||
|
|
53f5672524 | ||
|
|
9d00eec6c4 | ||
|
|
3b1f1ddb2d | ||
|
|
a249d2714f | ||
|
|
3d40dcf3c5 | ||
|
|
d07f61314b | ||
|
|
7355a04274 | ||
|
|
3a782972e3 | ||
|
|
d12406bedc |
@@ -17,5 +17,5 @@ all code is your original work.
|
||||
|
||||
## License
|
||||
|
||||
Copyright (c) 2014, sourceLair, Limited (www.sourcelair.com) (MIT License)
|
||||
Copyright (c) 2014, SourceLair, Limited (www.sourcelair.com) (MIT License)
|
||||
Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
|
||||
|
||||
+23
-6
@@ -12,17 +12,34 @@
|
||||
* of columns)
|
||||
*/
|
||||
Terminal.prototype.fit = function () {
|
||||
var container = this.element.parentElement,
|
||||
var container = this.rowContainer,
|
||||
subjectRow = this.rowContainer.firstElementChild,
|
||||
rows = parseInt(container.offsetHeight / subjectRow.offsetHeight),
|
||||
rows,
|
||||
contentBuffer,
|
||||
characterWidth,
|
||||
cols;
|
||||
|
||||
|
||||
subjectRow.style.display = 'inline';
|
||||
characterWidth = parseInt(subjectRow.offsetWidth / this.cols);
|
||||
|
||||
contentBuffer = subjectRow.textContent;
|
||||
|
||||
subjectRow.innerHTML = ' '; /* Arbitrary character to calculate its dimensions */
|
||||
characterWidth = parseInt(subjectRow.offsetWidth);
|
||||
characterHeight = parseInt(subjectRow.offsetHeight);
|
||||
|
||||
subjectRow.style.display = '';
|
||||
|
||||
cols = parseInt(container.offsetWidth / characterWidth);
|
||||
cols = container.offsetWidth / characterWidth;
|
||||
cols = parseInt(cols);
|
||||
|
||||
var parentElementStyle = window.getComputedStyle(this.element.parentElement),
|
||||
parentElementHeight = parseInt(parentElementStyle.getPropertyValue('height')),
|
||||
elementStyle = window.getComputedStyle(this.element),
|
||||
elementPadding = parseInt(elementStyle.getPropertyValue('padding-top')) + parseInt(elementStyle.getPropertyValue('padding-bottom')),
|
||||
availableHeight = parentElementHeight - elementPadding,
|
||||
rowHeight = this.rowContainer.firstElementChild.offsetHeight;
|
||||
|
||||
rows = parseInt(availableHeight / rowHeight);
|
||||
|
||||
this.resize(cols, rows);
|
||||
}
|
||||
};
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "xterm.js",
|
||||
"version": "0.12",
|
||||
"version": "0.16",
|
||||
"ignore": ["demo", "docs", "test", ".gitignore"]
|
||||
}
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>xterm.js demo</title>
|
||||
<link rel="stylesheet" href="../src/xterm.css" />
|
||||
<link rel="stylesheet" href="../addon/fullscreen/fullscreen.css" />
|
||||
<link rel="stylesheet" href="../addons/fullscreen/fullscreen.css" />
|
||||
<link rel="stylesheet" href="style.css" />
|
||||
<script src="../src/xterm.js" ></script>
|
||||
<script src="../addons/fit/fit.js" ></script>
|
||||
|
||||
+3
-3
@@ -44,16 +44,16 @@ master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'xterm.js'
|
||||
copyright = u'2014, sourceLair Limited'
|
||||
copyright = u'2014, SourceLair Limited'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.11'
|
||||
version = '0.16'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.11 Alpha'
|
||||
release = '0.16 Alpha'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
||||
+2
-2
@@ -916,9 +916,9 @@ Terminal.prototype.bindMouse = function() {
|
||||
if (self.mouseEvents) return;
|
||||
if (self.applicationKeypad) return;
|
||||
if (ev.type === 'DOMMouseScroll') {
|
||||
self.scrollDisp(ev.detail < 0 ? -5 : 5);
|
||||
self.scrollDisp(ev.detail < 0 ? -1 : 1);
|
||||
} else {
|
||||
self.scrollDisp(ev.wheelDeltaY > 0 ? -5 : 5);
|
||||
self.scrollDisp(ev.wheelDeltaY > 0 ? -1 : 1);
|
||||
}
|
||||
return self.cancel(ev);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user