Commit c79b2da9 authored by ibuler's avatar ibuler

[Update] 更新窗口大小问题

parent f10b2a3d
iframe { iframe {
width: 100%;
height: 100%;
border: none; border: none;
background-color: white; background-color: white;
} }
...@@ -2,18 +2,19 @@ ...@@ -2,18 +2,19 @@
div { div {
width: 100%; width: 100%;
height: 100%; height: 100%;
padding: 15px 0 15px 15px; /*padding: 15px 0 15px 15px;*/
} }
.terminal .xterm-rows { .terminal .xterm-rows {
border: #000 solid 5px; border: #000 solid 1px;
color: #f0f0f0; color: #f0f0f0;
box-shadow: rgba(0, 0, 0, 0.8) 2px 2px 20px; box-shadow: rgba(0, 0, 0, 0.8) 2px 2px 20px;
white-space: nowrap; white-space: nowrap;
display: inline-block; display: inline-block;
height: 100%; height: 100%;
font-size: 11px; font-size: 11px;
*padding: 15px 0 15px 15px;;
} }
div.terminal div span { div.terminal div span {
......
...@@ -44,8 +44,8 @@ export class ElementTermComponent implements OnInit, AfterViewInit { ...@@ -44,8 +44,8 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
contentElement = $('body'); contentElement = $('body');
} }
const markerElement = $('#marker'); const markerElement = $('#marker');
const col = Math.floor(contentElement.width() / markerElement.width() * 6) - 8; const col = Math.floor((contentElement.width() - 30) / markerElement.width() * 6) - 1;
const row = Math.floor(contentElement.height() / markerElement.height()) - 2; const row = Math.floor((contentElement.height() - 30) / markerElement.height());
this.col = col > 80 ? col : 80; this.col = col > 80 ? col : 80;
this.row = row > 24 ? row : 24; this.row = row > 24 ? row : 24;
console.log('Box size: ', contentElement.width(), '*', contentElement.height()); console.log('Box size: ', contentElement.width(), '*', contentElement.height());
......
div, elements-term, elements-guacamole, elements-settings { div, elements-term, elements-guacamole, elements-settings {
/*height: 100%;*/ height: 100%;
} }
elements-term, elements-guacamole, elements-settings { elements-term, elements-guacamole, elements-settings {
padding-bottom: 30px; /*padding-bottom: 30px;*/
} }
.window { .window {
......
<div fxLayout="column" ngxSplit="column" style="width: 100%;height: 100%;"> <div fxLayout="column" ngxSplit="column" style="width: 100%;height: 100%;">
<div fxFlex="1 1 30px" class="search"> <div fxFlex="0 0 30px" class="search">
<pages-control-nav></pages-control-nav> <pages-control-nav></pages-control-nav>
</div> </div>
<div fxFlex> <div fxFlex="0 0 calc(100%-35px)">
<div class="window" *ngFor="let m of NavList.List;let i=index" <div class="window" *ngFor="let m of NavList.List;let i=index"
[ngClass]="{'active':i==NavList.Active}" style="height: 100%"> [ngClass]="{'active':i==NavList.Active}" style="height: 100%">
<elements-ssh-term [index]="i" <elements-ssh-term [index]="i"
......
<div [ngStyle]="{'width.px': replay.width,'height.px':replay.height}"> <div [ngStyle]="{'width.px': 800,'height.px': 400}">
<video controls> <video controls>
<source [src]="replay.src" type="video/mp4"> <source [src]="replay.src" type="video/mp4">
Your browser does not support the video tag. Your browser does not support the video tag.
......
...@@ -31,28 +31,27 @@ export class PagesReplayComponent implements OnInit { ...@@ -31,28 +31,27 @@ export class PagesReplayComponent implements OnInit {
this.replay.type = data['type']; this.replay.type = data['type'];
this.replay.src = data['src']; this.replay.src = data['src'];
this.replay.id = data['id']; this.replay.id = data['id'];
},
err => {
this._http.get_replay(token)
.subscribe(
data => {
this.replay.type = 'json';
this.replay.json = data;
this.replay.src = 'READY';
this.replay.timelist = Object.keys(this.replay.json).map(Number);
this.replay.timelist = this.replay.timelist.sort(function (a, b) {
return a - b;
});
this.replay.totalTime = this.replay.timelist[this.replay.timelist.length - 1] * 1000;
}, err2 => {
alert('无法下载');
this._logger.error(err2);
},
);
} }
); );
// err => {
// this._http.get_replay(token)
// .subscribe(
// data => {
// this.replay.type = 'json';
// this.replay.json = data;
// this.replay.src = 'READY';
// this.replay.timelist = Object.keys(this.replay.json).map(Number);
// this.replay.timelist = this.replay.timelist.sort(function (a, b) {
// return a - b;
// });
// this.replay.totalTime = this.replay.timelist[this.replay.timelist.length - 1] * 1000;
//
// }, err2 => {
// alert('无法下载');
// this._logger.error(err2);
// },
// );
// }
// );
} }
} }
...@@ -41,6 +41,11 @@ app-root { ...@@ -41,6 +41,11 @@ app-root {
.terminal .xterm-rows { .terminal .xterm-rows {
background-color: #1f1b1b; background-color: #1f1b1b;
/*margin: 15px;*/
}
.xterm-rows {
padding: 15px;
} }
.terminal .xterm-viewport { .terminal .xterm-viewport {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment