Skip to content

Commit

Permalink
feat(links): configurable viewport (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Feb 28, 2022
1 parent 7745c42 commit 5011174
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/plugins/links-gl/LinkVolumes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ class MyPlugin extends Vue {
network: '',
geojsonFile: '',
projection: '',
center: null,
zoom: 9,
widthFactor: null as any,
thumbnail: '',
sum: false,
Expand Down Expand Up @@ -511,6 +513,19 @@ class MyPlugin extends Vue {
private async setMapCenter() {
const data = this.geojsonData
if (this.vizDetails.center) {
this.$store.commit('setMapCamera', {
longitude: this.vizDetails.center[0],
latitude: this.vizDetails.center[1],
bearing: 0,
pitch: 0,
zoom: this.vizDetails.zoom,
jump: false,
})
return
}
if (!data.source.length) return
let samples = 0
Expand Down

0 comments on commit 5011174

Please sign in to comment.