-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to make layercontrol widget uncollapsible? #628
Comments
Set the widget's See the available types here: |
I did like this but the widget doesn't display anymore: |
Its case sensitive. Change your type to Check out the code that uses your config to figure out what's going on there: https://github.com/cmv/cmv-app/blob/develop/viewer/js/viewer/_WidgetsMixin.js#L82 |
@JudyZhou An alternative approach available in the current layerControl: {
include: true,
id: 'layerControl',
type: 'titlePane',
path: 'gis/dijit/LayerControl',
title: i18n.viewer.widgets.layerControl,
open: false,
position: 0,
paneOptions: {
toggleable: false
},
options: {
map: true,
layerControlLayerInfos: true,
separated: true,
vectorReorder: true,
overlayReorder: true
}
}, You'll probably also want to add some css to adjust the mouse cursor for the title of that titlePane so it does not appear to be clickable: #layerControl_parent .dijitTitlePaneTitle {
cursor: default;
} |
👍 Didn't know about that one |
tmcgee, I got runtime error with title: i18n.viewer.widgets.layerControl. if I remove this, leave it like title: ' ', then it is still toggleable. |
tmcgee, error: 0x800a1391 - JavaScript runtime error: 'i18n' is undefined |
@JudyZhou you need to be using the CMV code in the develop branch in order for my suggestion to work. From the error and comment, it sounds like you are not using that version. |
yes, I think I used CMV code, viewer.js:
}, {
Help',
|
@tmcgee could you please take look of it above? Thank you! |
@JudyZhou I can tell by the files listed in your screenshot that you are not using code from the develop branch. I assume you are then using version 1.3.4 and suggest you may want to follow the instructions that @roemhildtg provided. |
@tmcgee what is the current version or code from the develop branch? not sure any other property is needed? |
@JudyZhou I am on mobile today. I will post a working solution when I can if you don't get it working before that. |
@tmcgee I still cannot make it work. Could you please help? I appreciate it. |
@JudyZhou it looks like http://jsbin.com/maxunomeze/edit?js,console,output https://github.com/cmv/cmv-app/blob/develop/viewer/js/viewer/_WidgetsMixin.js#L225 I'm not sure why, but |
If you switch to the "develop" branch though, @tmcgee solution does work. |
@roemhildtg yep If you explicitly include the placeAt like layerControl: {
include: true,
id: 'layerControl',
type: 'contentPane',
placeAt: 'left',
path: 'gis/dijit/LayerControl',
title: 'Layers',
options: {
map: true,
layerControlLayerInfos: true,
separated: true,
vectorReorder: true,
overlayReorder: true
}
}, |
thank you so much @tmcgee, it works! it displays at bottom of the other widgets in the panel. how to make it at top? |
@tmcgee @roemhildtg 'dojo/i18n!config/nls/main' still doesn't work for me. Do I miss some resource file folder like config/nls/main? |
If that file doesn't work, that means you are missing the file referenced by that path As @tmcgee mentioned, that file was added in the develop version of cmv, so if you switch to the latest develop branch you will have that file. You can use
The i18n stuff is for using cmv in different languages. If you're not needing the extra language support, alternatively you can remove that line of code that references the file and |
@JudyZhou Another way to get a copy of the latest from the develop branch is download a zip file, That of course would only be a static copy of the development work in progress at the time you download it. If you want to stay current with the development track, the process that @roemhildtg described is a better approach. |
my users want the layer control to be open always by either way make up-arrow invisible or disable. how to do that? Thanks!
The text was updated successfully, but these errors were encountered: