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
Support user functionalities to toggle the filter tool on upon init #2808
Conversation
contribs/gmf/externs/gmf-themes.js
Outdated
* | ||
* @type {Array.<!string>|undefined} | ||
*/ | ||
gmfThemes.GmfFunctionalities.prototype.open_layer_filter_panel; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The functionality should be open_panel
and contain ['layer_filter']
to open that panel.
const defaultTheme = functionalities.default_theme; | ||
if (defaultTheme.length > 0) { | ||
themeName = defaultTheme[0]; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change this part?
this.defaultFiltrableDataSourceName_ = usrFunc['preset_layer_filter'][0]; | ||
} else { | ||
this.defaultFiltrableDataSourceName_ = undefined; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be simplified to this.defaultFiltrableDataSourceName_ = usrFunc && usrFunc['preset_layer_filter'] && usrFunc['preset_layer_filter'][0]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would set a false
value. I want an undefined
value. Anyway, having a simplified version of this is not that useful since it already gets minimized and simplified automatically when building the minimized version. I'll leave this as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can try it, that would set an undefined
value. But fine to me to keep as you did.
f3b31eb
to
a7a380c
Compare
Fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR introduces the support of the two following GMF user "functionalities":
"open_layer_filter_panel": ["true"]
- when defined, the filter panel is open upon loading a desktop application."preset_layer_filter": ["inventaire_equipements"]
- when defined, the name of the layer (data source) automatically: 1) open the filter panel, 2) select the data source in the filter selector tool.