Unverified Commit a44c0b99 authored by 老广's avatar 老广 Committed by GitHub

Merge pull request #85 from xionghui/master

support chrome firefox and ie explorer fullscreen
parents 6bdade09 7398bdf3
......@@ -67,7 +67,20 @@ export class ElementNavComponent implements OnInit {
break;
}
case 'FullScreen': {
document.getElementsByClassName('window active ')[0].requestFullscreen();
let ele:any = document.getElementsByClassName("window active ")[0];
if (ele.requestFullscreen) {
ele.requestFullscreen();
} else if (ele.mozRequestFullScreen) {
ele.mozRequestFullScreen();
} else if (ele.msRequestFullscreen) {
ele.msRequestFullscreen();
} else if (ele.webkitRequestFullscreen) {
ele.webkitRequestFullScreen();
} else {
throw new Error('不支持全屏api');
}
window.dispatchEvent(new Event('resize'));
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment