zengh
2020-11-13 8274f20d8093486dc3d54e074d25b6e412f4e4c7
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
define([
  'dojo/_base/declare',
  'dojo/_base/lang',
  'dojo/on',
  'dijit/_WidgetBase',
  'dijit/_TemplatedMixin'
],
  function(declare, lang, on, _WidgetBase, _TemplatedMixin) {
  return declare([_WidgetBase, _TemplatedMixin], {
    templateString: '<div></div>',
    postCreate: function(){
      this.own(on(window, 'resize', lang.hitch(this, this._onWindowResize)));
    },
 
    getConfig: function(){
      //implemented by sub class, should return the config object.
      //if this function return a promise, the promise should resolve the config object.
    },
 
    getDataSources: function(){
      //implemented by sub class, should return the data sources that this widget generates.
      //if this function return a promise, the promise should resolve the data sources object.
    },
 
    // setConfig: function(/* jshint unused:false */ config){
    //   //implemented by sub class, should update the config UI
    // },
 
    resize: function(){
 
    },
 
    _onWindowResize: function(){
      this.resize();
    }
 
  });
});