| | |
| | | return declare([BaseWidget], { |
| | | baseClass: 'jimu-widget-SplitScreen', |
| | | name: 'SplitScreen', |
| | | flag: false, |
| | | startup: function () { |
| | | var that = this; |
| | | // 点击x隐藏面板 |
| | | $('#viewportType').change(function () { |
| | | |
| | | }); |
| | | topic.subscribe("openSplitScreen", lang.hitch(this, this.openSplitScreen)); |
| | | topic.subscribe("closeSplitScreen", lang.hitch(this, this.closeSplitScreen)); |
| | | |
| | | $('#viewportType').click(function () { |
| | | $(".split-select .split-select-option").toggle(); |
| | |
| | | }) |
| | | |
| | | $('.jimu-widget-SplitScreen .close').click(function () { |
| | | that.map.scene.multiViewportMode = Cesium.MultiViewportMode['NONE']; |
| | | $('.jimu-widget-SplitScreen').hide(); |
| | | that.closeSplitScreen('closeSplitScreen') |
| | | }); |
| | | |
| | | }, |
| | | |
| | | openSplitScreen: function (item) { |
| | | if (item == this.name) { |
| | | this.flag = true; |
| | | $('.jimu-widget-SplitScreen').show(); |
| | | } |
| | | }, |
| | | |
| | | closeSplitScreen: function (item) { |
| | | var that = this; |
| | | if (item == this.name) { |
| | | if (this.flag = true) { |
| | | this.flag = false; |
| | | $('#viewportType span').text("不使用分屏"); |
| | | $("#split_up").css("display", "none"); |
| | | $("#split_bottom").css("display", "none"); |
| | | $("#split_left").css("display", "none"); |
| | | $("#split_right").css("display", "none"); |
| | | $("#split_vertical_trisection_left").css("display", "none"); |
| | | $("#split_vertical_trisection_right").css("display", "none"); |
| | | $('#pannel').hide(); |
| | | that.map.scene.multiViewportMode = Cesium.MultiViewportMode['NONE']; |
| | | $('.jimu-widget-SplitScreen').hide(); |
| | | } |
| | | } |
| | | }, |
| | | |
| | | onOpen: function () { |
| | | |
| | | }, |