Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Hide option to center on first position when already using center by …
Browse files Browse the repository at this point in the history
…last position (#34)
  • Loading branch information
j-or authored Nov 5, 2020
1 parent b5c2e64 commit 6646147
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion dist/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -28246,7 +28246,10 @@ var plugin = new _grafana_data__WEBPACK_IMPORTED_MODULE_0__["PanelPlugin"](_Trac
return builder.addBooleanSwitch({
path: 'map.useCenterFromFirstPos',
name: 'Map center to first position',
defaultValue: false
defaultValue: false,
showIf: function showIf(config) {
return !config.map.useCenterFromLastPos;
}
}).addBooleanSwitch({
path: 'map.useCenterFromLastPos',
name: 'Map center to last position',
Expand Down
2 changes: 1 addition & 1 deletion dist/module.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const plugin = new PanelPlugin<TrackMapOptions>(TrackMapPanel).setPanelOp
path: 'map.useCenterFromFirstPos',
name: 'Map center to first position',
defaultValue: false,
showIf: config => !config.map.useCenterFromLastPos,
})
.addBooleanSwitch({
path: 'map.useCenterFromLastPos',
Expand Down

0 comments on commit 6646147

Please sign in to comment.