修正在手机状态下得到的视图大小错误的问题.

This commit is contained in:
ChenX 2018-06-06 16:00:53 +08:00
parent 1f0a91b75a
commit 256a7ea8a6
4 changed files with 6 additions and 6 deletions

4
dist/Viewer.js vendored
View File

@ -13,8 +13,8 @@ class Viewer {
this.m_bNeedUpdate = true;
this.m_Scene = new THREE.Scene();
this.OnSize = (width, height) => {
this._Width = width ? width : this.m_DomEl.scrollWidth;
this._Height = height ? height : this.m_DomEl.scrollHeight;
this._Width = width ? width : this.m_DomEl.clientWidth;
this._Height = height ? height : this.m_DomEl.clientHeight;
//校验.成为2的倍数 避免外轮廓错误.
if (this._Width % 2 == 1)
this._Width -= 1;

View File

@ -1,6 +1,6 @@
{
"name": "cadview",
"version": "1.1.4",
"version": "1.1.5",
"description": "",
"main": "dist/index.js",
"types": "dist/index.d.ts",

View File

@ -86,8 +86,8 @@ export class Viewer
OnSize = (width?, height?) =>
{
this._Width = width ? width : this.m_DomEl.scrollWidth;
this._Height = height ? height : this.m_DomEl.scrollHeight;
this._Width = width ? width : this.m_DomEl.clientWidth;
this._Height = height ? height : this.m_DomEl.clientHeight;
//校验.成为2的倍数 避免外轮廓错误.
if (this._Width % 2 == 1)

File diff suppressed because one or more lines are too long