• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 8 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0043 秒)

1. 2.0版本 ios浏览器旋转,会导致适配出现问题,无法旋转回来 [ 100%]

...ndowOnWidth=false; } if ((/Android/gi).test(navigator.userAgent)) { window.addEventListener('resize', function () { if (document.activeElement.tagName == 'INPUT' ||  document.activeElement.tagName == 'TEXTAREA') { window.setTimeout(function () { document.activeElement.scrollIntoViewIfNeeded(); }, 0...

来源: Laya_社区 发布时间: 20190313

2. 浏览器接口 · LayaAir3.0文档 · LAYABOX [ 98%]

...ntent, url);// 此处最好加延迟 //监听器注册 Laya.Browser.window.addEventListener("click", (event: any) => { console.log(event.type); }) Window.open() 方法、window.postMessage()方法、Window.addEventListener()方法 3.3 container 画布 LayaAir引擎里可以通过 Laya.Browser.con...

来源: Laya3.0_文档 发布时间: 20230810

3. 如何失去鼠标焦点 [ 97%]

...idth:1200px; height:600px"); document.body.appendChild(div); document.body.addEventListener("touchmove", touchmoves, false); function touchmoves(e) { if(window.pageYOffset<0) { div.style.visibility="hidden";//隐藏div Laya.MouseManager.instance.disableMouseEvent; e.preventDefault();//停止滑...

来源: Laya_社区 发布时间: 20170517

4. 无法触发浏览器文件上传框 [ 96%]

...t type="text/javascript"> var btn = document.getElementById('btn'); btn.addEventListener('click', function(){ document.getElementById("file").click(); }); </script> </body> </html>我想你理解错了,我是想触发原生js的事件,不是去监听,我把两种的demo都...

来源: Laya_社区 发布时间: 20170511

5. 关于HTMLCanvas 截图功能 [ 93%]

...; icon.loadImage('img/test.png'); Laya.stage.addChild(icon); document.body.addEventListener("click",function(){ var kk = icon.drawToCanvas(431, 428).getContext('2d').canvas; var img = new Image(); img.src = kk.toDataURL(); document.body.appendChild(img); });    我就用Sprite加载了一个图片...

来源: Laya_社区 发布时间: 20161107

6. TextInput怎么执行focus()? [ 92%]

...cument.getElementById('test'), btn = document.querySelector('button'); btn.addEventListener('click', function(){ let int = document.createElement('input'); int.type = 'text'; document.body.appendChild(int); // input.focus(); int.focus(); })我这样是可以直接直接打开键盘的,只要放到...

来源: Laya_社区 发布时间: 20180919

7. ios safari横屏下,鼠标点击不正确,且旋转屏幕时显示错位 [ 82%]

...nerHeight; 即可   修改后的laya.core.js,先定位到21176行window.addEventListener("resize",function(){ setTimeout(function(){ var orientation=Browser.window.orientation; if (orientation !=null && orientation !=_$this._previousOrientation && _me._isInputting()){ Input["input...

来源: Laya_社区 发布时间: 20190515

8. 微信小游戏加载资源问题 [ 14%]

...Type = function (value) { }; node.setFontFace = function (value) { }; node.addEventListener = function (value) { }; node.contains = function (value) { return null; }; node.removeChild = function (value) { }; return node; } static createShaderCondition(conditionScript) { var func = function () { retu...

来源: Laya_社区 发布时间: 20200103