File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,8 @@ const context = (state = {}, action) => {
1616 ? action . contextObject . params . project_id
1717 : undefined ,
1818 presetTitle : action . configObject . title ,
19- titleStyle : getTitleStyle ( action . configObject ) ,
19+ // Todo: set titleStyle = "custom" if custom_title exists
20+ titleStyle : action . contextObject . params . custom_title ? 'custom' : getTitleStyle ( action . configObject ) ,
2021 titleLabelType : getTitleLabelType ( action . configObject ) ,
2122 customTitle : action . configObject . custom_title ? action . configObject . custom_title : action . contextObject . params . custom_title ,
2223 } ;
@@ -26,11 +27,11 @@ const context = (state = {}, action) => {
2627} ;
2728
2829const getTitleStyle = ( config ) => {
30+
2931 if ( config . create_title_from_context ) {
3032 if ( config . create_title_from_context_style ) {
3133 return config . create_title_from_context_style ;
3234 }
33-
3435 return "standard" ;
3536 }
3637
Original file line number Diff line number Diff line change @@ -92,8 +92,7 @@ const mapStateToProps = (state) => ({
9292 isStreamgraph : state . chartType === STREAMGRAPH_MODE ,
9393 query : state . query . text ,
9494 customTitle :
95- // state.heading.titleStyle === "custom" ? state.heading.customTitle : null,
96- state . heading . customTitle ,
95+ state . heading . titleStyle === "custom" ? state . heading . customTitle : null ,
9796 timestamp : state . misc . timestamp ,
9897 q_advanced : state . q_advanced . text ,
9998 titleStyle : state . heading . titleStyle
You can’t perform that action at this time.
0 commit comments