所以苹果手机微信进去都报这个错误 ,跟机型和微信版本都没关系 。我想知道怎么拿堆栈信息呢?? gameThirdScriptError TypeError: JSON.stringify cannot serialize cyclic structures. at line undefined in undefined undefined
ios微信小游戏,横屏适配- 当前 Bug 的表现(可附上截图) - 预期表现 canvas.style.width = canvas.width(未横屏之前的宽) canvas.style.height = canvas.height(未横屏之前的高) - 复现路径 - 提供一个最简复现 Demo 测试环境ios微信小游戏 以下为game.js代码片段 let sysInfo = wx.getSystemInfoSync(); let canvas = window.canvas; let orgWidth = canvas.width; let orgHeight = canvas.height; console.log("org canvas:", canvas); canvas.style["transformOrigin"] = "0% 0% 0px"; canvas.width = sysInfo.pixelRatio * orgHeight;//宽高翻转 canvas.height = sysInfo.pixelRatio * orgWidth;//宽高翻转 canvas.style.bottom = "0"; canvas.style.right = "0"; canvas.style.top = "0px"; canvas.style.left = "0px"; canvas.style["transform"] = "matrix(" + (1 / sysInfo.pixelRatio) + ", 0, 0, " + (1 / sysInfo.pixelRatio) + ", 0, 0)"; console.log("update canvas:", canvas); 这里打印出来canvas.style的width,height一直都是0,我想知道是什么原因?,参见下图 //egret.wxgame.WebPlayer中也是这样设置,最后看到canvas.style 宽高有值(原canvas的宽高) [图片]
2018-09-10