Retour à la documentation
/**
* @class spw.widgets.SpwMobileMenu
*/
define([
'dojo/_base/declare',
'dojo/_base/lang',
'dojo/_base/array',
'dojo/on',
'dojo/text!./templates/SpwMobileMenu.html',
'spw/api/SpwBaseTemplatedWidget',
'spw/widgets/SpwQuickAddressSearch'
], function(declare, lang, array, on, template, _Templated, SpwQuickAddressSearch) {
return declare('spw.widgets.SpwMobileMenu', [_Templated], {
templateString: template,
addressSearchConfig: null,
postCreate: function() {
this.inherited(arguments);
new SpwQuickAddressSearch(lang.mixin({
spwViewer: this.spwViewer,
inWidget: true,
noTitle: true,
goToMyPositionAtStart: true
}, this.addressSearchConfig), this.addressNode).startup();
this.own(on(this.openMenuNode, 'click', lang.hitch(this, this.openMenuClicked)));
},
openMenuClicked: function(evt) {
if (this.spwViewer && this.spwViewer.spwMobile) {
this.spwViewer.spwMobile.openMenu();
}
}
});
});