|
@@ -13,7 +13,7 @@
|
|
<link rel="stylesheet" href="css/app.css">
|
|
<link rel="stylesheet" href="css/app.css">
|
|
</head>
|
|
</head>
|
|
<body>
|
|
<body>
|
|
-<div class="container">
|
|
|
|
|
|
+<div class="container no-fix-height">
|
|
<div tabindex="1" class="mditor preview">
|
|
<div tabindex="1" class="mditor preview">
|
|
<div class="head">
|
|
<div class="head">
|
|
<ul class="toolbar">
|
|
<ul class="toolbar">
|
|
@@ -83,11 +83,17 @@
|
|
// ws.send("Hello, world");
|
|
// ws.send("Hello, world");
|
|
};
|
|
};
|
|
var viewer = $('.viewer');
|
|
var viewer = $('.viewer');
|
|
|
|
+ var body = $('body');
|
|
ws.onmessage = function (evt) {
|
|
ws.onmessage = function (evt) {
|
|
var msg = JSON.parse(evt.data);
|
|
var msg = JSON.parse(evt.data);
|
|
console.log('>>>', msg);
|
|
console.log('>>>', msg);
|
|
ctrl.handle_message(msg);
|
|
ctrl.handle_message(msg);
|
|
- viewer.scrollTop(md_body[0].scrollHeight); // 自动滚动
|
|
|
|
|
|
+ // viewer.scrollTop(md_body[0].scrollHeight); // 输出区自动滚动
|
|
|
|
+ viewer.stop().animate({scrollTop:viewer[0].scrollHeight}, 700);
|
|
|
|
+ setTimeout(function () {
|
|
|
|
+ // body.scrollTop(body[0].scrollHeight); // 整个页面自动滚动
|
|
|
|
+ body.stop().animate({scrollTop:body[0].scrollHeight}, 700);
|
|
|
|
+ }, WebIO.FormShowDuration+10);
|
|
};
|
|
};
|
|
ws.onclose = function () {
|
|
ws.onclose = function () {
|
|
document.title = 'Closed';
|
|
document.title = 'Closed';
|