In WAB application at version 2.13, I would like to change the icon's place holder size of an Off-panel, on-screen widget. How do I do? thanks for any help.
Helen
Solved! Go to Solution.
Helen,
You are right in 2.13 it has changed to BaseLayoutManager.js in the jimu.js folder (lines 21 and 22).
_createOnScreenWidgetIcon: function(widgetConfig){
var iconDijit = new OnScreenWidgetIcon({
panelManager: this.panelManager,
widgetManager: this.widgetManager,
widgetConfig: widgetConfig,
configId: widgetConfig.id,
map: this.map
});
if(widgetConfig.position.relativeTo === 'map'){
html.place(iconDijit.domNode, this.mapId);
}else{
html.place(iconDijit.domNode, this.layoutId);
}
//icon position doesn't use width/height in config
html.setStyle(iconDijit.domNode, jimuUtils.getPositionStyle({
top: widgetConfig.position.top,
left: widgetConfig.position.left,
right: widgetConfig.position.right,
bottom: widgetConfig.position.bottom,
width: 40,
height: 40
}));
iconDijit.startup();
if(!this.openAtStartWidget && widgetConfig.openAtStart){
iconDijit.switchToOpen();
this.openAtStartWidget = widgetConfig.name;
}
this.onScreenWidgetIcons.push(iconDijit);
return iconDijit;
},
I believe this is the thraed you are looking for then:
Thanks Robert. I have read the thread, It looks like the code has been changed at version 2.13. I am not able to see the correspondent codes. I have changed jimu-widget-onscreen-icon in \jimu.js\css\jimu.css. It doesn't work. Do you have any idea?
Thanks
Helen
Helen,
You are right in 2.13 it has changed to BaseLayoutManager.js in the jimu.js folder (lines 21 and 22).
_createOnScreenWidgetIcon: function(widgetConfig){
var iconDijit = new OnScreenWidgetIcon({
panelManager: this.panelManager,
widgetManager: this.widgetManager,
widgetConfig: widgetConfig,
configId: widgetConfig.id,
map: this.map
});
if(widgetConfig.position.relativeTo === 'map'){
html.place(iconDijit.domNode, this.mapId);
}else{
html.place(iconDijit.domNode, this.layoutId);
}
//icon position doesn't use width/height in config
html.setStyle(iconDijit.domNode, jimuUtils.getPositionStyle({
top: widgetConfig.position.top,
left: widgetConfig.position.left,
right: widgetConfig.position.right,
bottom: widgetConfig.position.bottom,
width: 40,
height: 40
}));
iconDijit.startup();
if(!this.openAtStartWidget && widgetConfig.openAtStart){
iconDijit.switchToOpen();
this.openAtStartWidget = widgetConfig.name;
}
this.onScreenWidgetIcons.push(iconDijit);
return iconDijit;
},