1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
| ///////////////////////////////////////////////////////////////////////////
| // Copyright © 2018 NarutoGIS. All Rights Reserved.
| // 模块描述:全屏按钮
| ///////////////////////////////////////////////////////////////////////////
| define([
| 'dojo/_base/declare',
| 'dojo/_base/lang',
| 'dojo/_base/html',
| 'dojo/on',
| "dojo/query",
| 'jimu/BaseWidget',
| "dojo/_base/window",
| 'jimu/utils'
| ], function (declare, lang, html, on, query, BaseWidget, win, jimuUtils) {
| var clazz = declare([BaseWidget], {
| name: 'FullScreen',
| baseClass: 'jimu-widget-fullScreen',
|
| _changeColorThemes: ["BillboardTheme", "BoxTheme", "DartTheme", "PlateauTheme"],
|
| startup: function () {
| this.inherited(arguments);
| new Cesium.FullscreenButton(this.domNode, null);
|
| $('.cesium-fullscreenButton').attr('title', '全屏视角');
| $(".jimu-widget-fullScreen button.cesium-button").html("<img src='./images/全屏.png' alt=''>");
|
| $('.jimu-widget-fullScreen button.cesium-button').click(function () {
| var title = $(this).attr('title');
|
| if (title == "Exit full screen") {
|
| $(".jimu-widget-fullScreen button.cesium-button").html("<img src='./images/全屏.png' alt=''>");
|
| } else {
|
| $(".jimu-widget-fullScreen button.cesium-button").html("<img src='./images/收缩.png' alt=''>");
|
| }
| })
|
| },
|
| setPosition: function ( /*position*/ ) {
| this.inherited(arguments);
|
| },
|
|
| });
|
| return clazz;
| });
|
|