From e1716e674a91e7b412849710f432b83c88b5044b Mon Sep 17 00:00:00 2001 From: DmitriyMX Date: Sun, 11 Jun 2017 23:32:15 +0300 Subject: [PATCH] =?UTF-8?q?MCSM:Webconsole:=20=D0=B8=D1=81=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=BE=20=D0=BF=D0=B0=D1=80=D0=B0?= =?UTF-8?q?=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - полоска прокрутки показывается только при необходимости; - при переключении серверов, консоль очищается. --- mcserver-manager/build.gradle | 2 +- mcserver-manager/src/main/resources/components.js | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mcserver-manager/build.gradle b/mcserver-manager/build.gradle index baef3c0..26fec6d 100644 --- a/mcserver-manager/build.gradle +++ b/mcserver-manager/build.gradle @@ -1,5 +1,5 @@ group = 'asys' -version = '0.10.1-SNAPSHOT' +version = '0.10.2-SNAPSHOT' apply plugin: 'osgi' diff --git a/mcserver-manager/src/main/resources/components.js b/mcserver-manager/src/main/resources/components.js index 5b5d359..3b371a1 100644 --- a/mcserver-manager/src/main/resources/components.js +++ b/mcserver-manager/src/main/resources/components.js @@ -82,8 +82,11 @@ var ScrollingContent = React.createClass({ this.scrollRatio = this.ownHeight / this.totalHeight; if (isNaN(this.scrollRatio)) this.scrollRatio = 0; - this.refs.scroll.style.height = this.scrollRatio * 100 + "%"; - this.refs.scroll.style.top = (this.refs.content.scrollTop / this.totalHeight) * 100 + "%"; + var h = this.scrollRatio * 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; }, handleScrollMouseDown: function (event) { @@ -231,6 +234,7 @@ var ServerInfo = React.createClass({ if (this.state.title === null) return; if (this.state.title !== nextState.title) { this.refs.webconsole.disconnect(); + this.refs.webconsole.setState({lines: []}); this.refs.tabs.setState({activeTab: 0}); } }