jxdnsong
2020-11-02 ad1ba4c7c03dd472a8d60787fd481c9f8631bc73
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
///////////////////////////////////////////////////////////////////////////
// Copyright © 2018 NarutoGIS. All Rights Reserved.
// 模块描述:按钮恢复全图视角
///////////////////////////////////////////////////////////////////////////
define([
  'dojo/_base/declare',
  'dojo/_base/lang',
  'jimu/BaseWidget',
  'dojo/_base/html',
  'dojo/dom-construct',
  'dojo/topic',
  'dojo/on'
],
  function (
    declare,
    lang,
    BaseWidget,
    html,
    domConstruct,
    topic,
    on) {
    var clazz = declare([BaseWidget], {
 
      name: 'VrButton',
      baseClass: 'jimu-widget-vrbutton',
 
      postCreate: function () {
        this.inherited(arguments);
      },
 
      startup: function () {
        var that = this;
        this.inherited(arguments);
        new Cesium.VRButton(this.domNode, this.map.scene)
        // new Cesium.VRButtonViewModel (scene, vrElement )
        
        $('.cesium-vrButton').attr('title','VR模式');
      }
 
    });
    return clazz;
  });