12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- define(function() {
- var status = {
- isFullScreen: false,
- initialized: false, //是否初始化
- };
- /**
- * 初始化并订阅事件
- * @return {[type]} [description]
- */
- function init() {
- if (!status.initialized) {
- subscribe();
- status.initialized = true
- }
- $(window).resize(function() {
- layoutResize();
- });
- ONEMAP.C.publisher.publish({
- modName: 'isFullScreen'
- }, 'tools:active');
- }
- /**
- * 页面重置
- */
- function layoutResize(){
- if (status.isFullScreen){
-
- }else{
-
- }
-
- }
- /**
- * 监听事件
- */
- function subscribe() {
- ONEMAP.C.publisher.subscribe(remove, 'tools:active');
- }
- function remove(options) {
- if (options.modName === 'isFullScreen') {
- if (status.isFullScreen) {
- ONEMAP.C.publisher.publish(false, 'layout::fullMap');
-
- $("#topBar .tools-fullScreen").removeClass('cur');
- /*if(map23DData.display.map3D){
- $(".tools-elevation").hide();
- $(".tools-painting").hide();
- $(".tools-marker").hide();
- $(".tools-measuring3DE").show();
- $(".tools-LDZZ").show();
- $(".tools-KSFX").show();
- $(".tools-TSFX").show();
- $(".tools-flyLineModal").show();
- }else if(map23DData.display.map2D){
- $(".tools-elevation").show();
- $(".tools-painting").show();
- $(".tools-marker").show();
- $(".tools-measuring3DE").hide();
- $(".tools-LDZZ").hide();
- $(".tools-KSFX").hide();
- $(".tools-TSFX").hide();
- $(".tools-flyLineModal").hide();
- }*/
- // $("#heighterSlider").show();
- $("#fullscreen").hide();
- $("#footer .contact").show();
- $('#topBar .tools-fullScreen').attr('title','全屏');
- $("#rule").hide();
- status.isFullScreen = false;
- } else {
- $("#fullscreen .cover-content").addClass('cur').addClass('tools-fullScreen');
- $("#fullscreen .cover-content").attr('title','退出全屏');
- $("#fullscreen").show();
- $("#heighterSlider").hide();
- $("#footer .contact").hide();
- ONEMAP.C.publisher.publish(true, 'layout::fullMap');
- // $("#topBar .tools-fullScreen").addClass('cur');
- // $('#topBar .tools-fullScreen').attr('title','退出全屏');
- status.isFullScreen = true;
- }
- }
- }
- return ONEMAP.M.toolFullScreen = {
- init: init
- }
- })
|