You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					57 lines
				
				1.8 KiB
			
		
		
			
		
	
	
					57 lines
				
				1.8 KiB
			| 
								 
											6 months ago
										 
									 | 
							
								<!DOCTYPE html>
							 | 
						||
| 
								 | 
							
								<html>
							 | 
						||
| 
								 | 
							
								<head>
							 | 
						||
| 
								 | 
							
								    <meta charset="utf-8">
							 | 
						||
| 
								 | 
							
								    <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    <script language="javascript" type="text/javascript">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										var uiObj = undefined;
							 | 
						||
| 
								 | 
							
										function MxUiMain(req) {
							 | 
						||
| 
								 | 
							
											 
							 | 
						||
| 
								 | 
							
								            MxFun = req("./MxFun").MxFun;
							 | 
						||
| 
								 | 
							
											MxFun.createMxUiObject(function (mxuiObj) {
							 | 
						||
| 
								 | 
							
											uiObj = mxuiObj;      
							 | 
						||
| 
								 | 
							
											mxuiObj.isShowLayout = true;
							 | 
						||
| 
								 | 
							
											mxuiObj.isShowLayer = true;
							 | 
						||
| 
								 | 
							
											}) 
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
										 
							 | 
						||
| 
								 | 
							
								        function MxMain(require) {
							 | 
						||
| 
								 | 
							
								            var MxFun = require("./MxFun").MxFun;
							 | 
						||
| 
								 | 
							
								            // 启用控件的静态加载功能,启用该功能后,就不需要MxServer.exe后台程序,也能加载显示dwg
							 | 
						||
| 
								 | 
							
								            MxFun.enablStaticLoad();
							 | 
						||
| 
								 | 
							
								            
							 | 
						||
| 
								 | 
							
								            MxFun.setStaticServer("http://localhost:3000/demo/buf");
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            // 创建控件对象,通过访问地址参数转入打开文件路径,如:http://localhost:3000/mxstatic.html?file=hhhh.dwg.mxb1.wgh
							 | 
						||
| 
								 | 
							
								            MxFun.createMxObject(undefined, undefined, (mxobj) => { 
							 | 
						||
| 
								 | 
							
								                //mxobj.setRequestHeader("{'data':'value1'}");
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                mxobj.addEvent("loadComplete", function () {
							 | 
						||
| 
								 | 
							
								                    // 图纸加载完成.
							 | 
						||
| 
								 | 
							
								                    console.log("loadComplete");
							 | 
						||
| 
								 | 
							
								                });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            });
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            //MxFun.createMxObject(undefined, "hhhh.dwg", (mxobj) => { 
							 | 
						||
| 
								 | 
							
								            //});
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            document.body.addEventListener('touchmove', function (e) {
							 | 
						||
| 
								 | 
							
								                e.preventDefault()
							 | 
						||
| 
								 | 
							
								            }, { passive: false })
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								            return 0;
							 | 
						||
| 
								 | 
							
								        }
							 | 
						||
| 
								 | 
							
								    </script>
							 | 
						||
| 
								 | 
							
								    <script language="javascript" type="text/javascript" src="js/jquery.js"></script>
							 | 
						||
| 
								 | 
							
								    <script language="javascript" type="text/javascript" src="js/mxfun.min.js"></script>
							 | 
						||
| 
								 | 
							
								</head>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<body style="overflow-x:hidden; overflow-y:hidden">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								</body>
							 | 
						||
| 
								 | 
							
								</html>
							 | 
						||
| 
								 | 
							
								
							 |