Skip to content

Commit

Permalink
Fix/bugs #34 & #37 (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderBoriskin committed Aug 1, 2019
1 parent c0a6292 commit 47d3b15
Show file tree
Hide file tree
Showing 5 changed files with 311 additions and 287 deletions.
62 changes: 31 additions & 31 deletions src/components/dashboard/DashboardMap.vue
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<template>
<va-card :title="$t('dashboard.currentVisitors')">
<line-map
class="dashboard-map"
:map-data="lineMapData"
/>
</va-card>
</template>

<script>
import LineMap from '@/components/maps/line-maps/LineMap'
import LineMapData from '@/data/maps/LineMapData'
export default {
name: 'dashboard-map',
components: {
LineMap,
},
data () {
return {
lineMapData: LineMapData,
}
},
}
</script>

<style>
.dashboard-map {
height: 380px;
}
</style>
<template>
<va-card :title="$t('dashboard.currentVisitors')">
<line-map
class="dashboard-map"
:map-data="lineMapData"
/>
</va-card>
</template>

<script>
import LineMap from '@/components/maps/line-maps/LineMap'
import { getLineMapData } from '../../data/maps/LineMapData'
export default {
name: 'dashboard-map',
components: {
LineMap,
},
computed: {
lineMapData () {
return getLineMapData(this.$themes)
},
},
}
</script>

<style>
.dashboard-map {
height: 380px;
}
</style>
18 changes: 12 additions & 6 deletions src/components/maps/line-maps/LineMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,14 @@ export default {
name: 'line-map',
props: ['mapData'],
watch: {
mapData: {
handler () {
this.drawMap()
},
deep: true,
},
},
methods: {
drawMap () {
/* global AmCharts */
Expand All @@ -35,12 +42,12 @@ export default {
outlineThickness: 2,
}
map.imagesSettings = {
color: '#6bbfe4',
rollOverColor: '#6bbfe4',
selectedColor: '#6be59c',
color: this.$themes['info'],
rollOverColor: this.$themes['info'],
selectedColor: this.$themes['primary'],
}
map.linesSettings = {
color: '#6bbfe4',
color: this.$themes['info'],
alpha: 0.4,
}
Expand All @@ -53,7 +60,6 @@ export default {
map.write(this.$el)
},
},
mounted () {
this.drawMap()
},
Expand Down
10 changes: 5 additions & 5 deletions src/components/maps/line-maps/LineMapsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@

<script>
import LineMap from './LineMap'
import LineMapData from 'data/maps/LineMapData'
import { getLineMapData } from '../../../data/maps/LineMapData'
export default {
name: 'line-maps-page',
components: {
LineMap,
},
data () {
return {
lineMapData: LineMapData,
}
computed: {
lineMapData () {
return getLineMapData(this.$themes)
},
},
}
</script>
7 changes: 5 additions & 2 deletions src/components/ui/popovers/Popovers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/>
<div class="row popover-example mt-5">
<va-popover
:icon="popover.icon"
:icon="popover.icon.icon"
:color="popover.color"
:title="popover.title"
:message="popover.message"
Expand Down Expand Up @@ -111,7 +111,10 @@ export default {
popover: {
title: 'Hey folks!',
message: 'This tooltip is amazing:D',
icon: 'fa fa-print',
icon: {
icon: 'fa fa-print',
text: 'print',
},
color: 'warning',
},
}
Expand Down
Loading

0 comments on commit 47d3b15

Please sign in to comment.