修正在手机状态下得到的视图大小错误的问题.
This commit is contained in:
		
							
								
								
									
										4
									
								
								dist/Viewer.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								dist/Viewer.js
									
									
									
									
										vendored
									
									
								
							@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{
 | 
			
		||||
  "name": "cadview",
 | 
			
		||||
  "version": "1.1.4",
 | 
			
		||||
  "version": "1.1.5",
 | 
			
		||||
  "description": "",
 | 
			
		||||
  "main": "dist/index.js",
 | 
			
		||||
  "types": "dist/index.d.ts",
 | 
			
		||||
 
 | 
			
		||||
@@ -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
											
										
									
								
							
		Reference in New Issue
	
	Block a user