Commit 30258675 authored by ibuler's avatar ibuler

[Bugfix] 修复窗口大小的

parent c8b8a4b3
...@@ -47,8 +47,8 @@ export class ElementTermComponent implements OnInit, AfterViewInit { ...@@ -47,8 +47,8 @@ export class ElementTermComponent implements OnInit, AfterViewInit {
getWinSize() { getWinSize() {
const activeEle = $('#winContainer'); const activeEle = $('#winContainer');
const markerEle = $('#marker'); const markerEle = $('#marker');
const cols = parseInt(activeEle.width() / markerEle.width() * 6, 10) - 6; const cols = Math.floor(activeEle.width() / markerEle.width() * 6) - 6;
const rows = parseInt(activeEle.height() / markerEle.height(), 10) - 1; const rows = Math.floor(activeEle.height() / markerEle.height()) - 1;
return [cols, rows]; return [cols, rows];
} }
......
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