mirror of
https://github.com/potato47/ccc-devtools.git
synced 2024-12-26 03:39:16 +00:00
fix:适配3.6.2,修复键盘事件失效问题
This commit is contained in:
parent
f7a300c3e6
commit
9a232daab8
Binary file not shown.
@ -25,7 +25,7 @@
|
|||||||
<div class="contentWrap">
|
<div class="contentWrap">
|
||||||
<div id="GameDiv" class="wrapper">
|
<div id="GameDiv" class="wrapper">
|
||||||
<div id="Cocos3dGameContainer">
|
<div id="Cocos3dGameContainer">
|
||||||
<canvas id="GameCanvas"></canvas>
|
<canvas id="GameCanvas" tabindex="-1" style="background-color: '';"></canvas>
|
||||||
</div>
|
</div>
|
||||||
<div id="splash">
|
<div id="splash">
|
||||||
<div class="progress-bar stripes"><span></span></div>
|
<div class="progress-bar stripes"><span></span></div>
|
||||||
@ -50,26 +50,26 @@
|
|||||||
</html>
|
</html>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.getElementsByClassName('toolbar')[0].insertAdjacentHTML('afterbegin', '<div><button id="btn-show-tree">Tree</button></div>');
|
// document.getElementsByClassName('toolbar')[0].insertAdjacentHTML('afterbegin', '<div><button id="btn-show-tree">Tree</button></div>');
|
||||||
const devtoolsBtn = document.getElementById('btn-show-tree');
|
// const devtoolsBtn = document.getElementById('btn-show-tree');
|
||||||
let isOpen = !!localStorage.getItem('ccc_devtools_show');
|
// let isOpen = !!localStorage.getItem('ccc_devtools_show');
|
||||||
toggle(isOpen);
|
// toggle(isOpen);
|
||||||
devtoolsBtn.addEventListener('click', () => {
|
// devtoolsBtn.addEventListener('click', () => {
|
||||||
isOpen = !isOpen;
|
// isOpen = !isOpen;
|
||||||
toggle(isOpen);
|
// toggle(isOpen);
|
||||||
}, false);
|
// }, false);
|
||||||
|
|
||||||
function toggle(isOpen) {
|
// function toggle(isOpen) {
|
||||||
const devApp = document.getElementById('dev-app');
|
// const devApp = document.getElementById('dev-app');
|
||||||
window.ccdevShow = isOpen;
|
// window.ccdevShow = isOpen;
|
||||||
if (isOpen) {
|
// if (isOpen) {
|
||||||
devApp.style.display = 'flex';
|
// devApp.style.display = 'flex';
|
||||||
devtoolsBtn.classList.add('checked');
|
// devtoolsBtn.classList.add('checked');
|
||||||
localStorage.setItem('ccc_devtools_show', 1);
|
// localStorage.setItem('ccc_devtools_show', 1);
|
||||||
} else {
|
// } else {
|
||||||
devApp.style.display = 'none';
|
// devApp.style.display = 'none';
|
||||||
devtoolsBtn.classList.remove('checked');
|
// devtoolsBtn.classList.remove('checked');
|
||||||
localStorage.removeItem('ccc_devtools_show');
|
// localStorage.removeItem('ccc_devtools_show');
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user