|
@@ -21,6 +21,7 @@ export default {
|
|
|
name: 'MapZoom',
|
|
|
|
|
|
props: {
|
|
|
+ value: { type: Object, default: () => ({ width: undefined, height: undefined }) },
|
|
|
id: { type: String, required: true },
|
|
|
minZoom: { type: Number, default: 0.3 },
|
|
|
maxZoom: { type: Number, default: 1 }
|
|
@@ -49,6 +50,7 @@ export default {
|
|
|
updateSize () {
|
|
|
const { width, height } = this.$el.getBoundingClientRect()
|
|
|
Object.assign(this.$data, { width, height })
|
|
|
+ this.$emit('input', { width, height })
|
|
|
},
|
|
|
|
|
|
onZoom (direction) {
|
|
@@ -76,6 +78,7 @@ export default {
|
|
|
position: relative;
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
+ cursor: grab;
|
|
|
|
|
|
svg {
|
|
|
width: 100%;
|