1
|
/*
|
2
|
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
|
3
|
$Id: TipWidgetConfig.js 3879 2008-02-27 14:20:29Z gjvoosten $
|
4
|
*/
|
5
|
|
6
|
// Ensure this object's dependancies are loaded.
|
7
|
mapbuilder.loadScript(baseDir+"/widget/TipWidgetBase.js");
|
8
|
|
9
|
/**
|
10
|
* Configuration for TipWidgetOL and similar widgets.
|
11
|
* @base TipWidgetBase
|
12
|
* @author Andreas Hocevar andreas.hocevarATgmail.com
|
13
|
* @param widgetNode The widget node from the Config XML file.
|
14
|
* @param model The FeatureCollection model.
|
15
|
*/
|
16
|
function TipWidgetConfig(widgetNode, model) {
|
17
|
TipWidgetBase.apply(this, new Array(widgetNode, model));
|
18
|
|
19
|
var targetWidget = this.getProperty('mb:targetWidget');
|
20
|
|
21
|
this.init = function(objRef) {
|
22
|
if (targetWidget) {
|
23
|
if (!model.config) {
|
24
|
model.config = new Array();
|
25
|
}
|
26
|
model.config[targetWidget] = objRef.config;
|
27
|
}
|
28
|
}
|
29
|
model.addListener('init', this.init, this);
|
30
|
}
|