MCSM:Webconsole: исправлено пара ошибок
- полоска прокрутки показывается только при необходимости; - при переключении серверов, консоль очищается.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
group = 'asys'
|
group = 'asys'
|
||||||
version = '0.10.1-SNAPSHOT'
|
version = '0.10.2-SNAPSHOT'
|
||||||
|
|
||||||
apply plugin: 'osgi'
|
apply plugin: 'osgi'
|
||||||
|
|
||||||
|
|||||||
@@ -82,8 +82,11 @@ var ScrollingContent = React.createClass({
|
|||||||
this.scrollRatio = this.ownHeight / this.totalHeight;
|
this.scrollRatio = this.ownHeight / this.totalHeight;
|
||||||
if (isNaN(this.scrollRatio)) this.scrollRatio = 0;
|
if (isNaN(this.scrollRatio)) this.scrollRatio = 0;
|
||||||
|
|
||||||
this.refs.scroll.style.height = this.scrollRatio * 100 + "%";
|
var h = this.scrollRatio * 100;
|
||||||
this.refs.scroll.style.top = (this.refs.content.scrollTop / this.totalHeight) * 100 + "%";
|
if (h < 100) {
|
||||||
|
this.refs.scroll.style.height = h + "%";
|
||||||
|
this.refs.scroll.style.top = (this.refs.content.scrollTop / this.totalHeight) * 100 + "%";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
toggleSelect: function (value, event) { return value; },
|
toggleSelect: function (value, event) { return value; },
|
||||||
handleScrollMouseDown: function (event) {
|
handleScrollMouseDown: function (event) {
|
||||||
@@ -231,6 +234,7 @@ var ServerInfo = React.createClass({
|
|||||||
if (this.state.title === null) return;
|
if (this.state.title === null) return;
|
||||||
if (this.state.title !== nextState.title) {
|
if (this.state.title !== nextState.title) {
|
||||||
this.refs.webconsole.disconnect();
|
this.refs.webconsole.disconnect();
|
||||||
|
this.refs.webconsole.setState({lines: []});
|
||||||
this.refs.tabs.setState({activeTab: 0});
|
this.refs.tabs.setState({activeTab: 0});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user