Improve code
This commit is contained in:
@@ -1,9 +1,6 @@
|
|||||||
/* vim: set softtabstop=2 shiftwidth=2 expandtab : */
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div ref="flyaway">
|
<div ref="infoWindow">
|
||||||
<!-- so named because it will fly away to another component -->
|
|
||||||
<slot> </slot>
|
<slot> </slot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -51,12 +48,12 @@ export default mapElementFactory({
|
|||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
const el = this.$refs.flyaway
|
const el = this.$refs.infoWindow
|
||||||
el.parentNode.removeChild(el)
|
el.parentNode.removeChild(el)
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeCreate(options) {
|
beforeCreate(options) {
|
||||||
options.content = this.$refs.flyaway
|
options.content = this.$refs.infoWindow
|
||||||
|
|
||||||
if (this.$markerPromise) {
|
if (this.$markerPromise) {
|
||||||
delete options.position
|
delete options.position
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import lazy from './utils/lazyValue'
|
import lazy from './utils/lazyValue'
|
||||||
import { loadGMapApi } from './manager'
|
import { loadGMapApi } from './load-google-maps'
|
||||||
import { createApp } from 'vue'
|
import { createApp } from 'vue'
|
||||||
import Marker from './components/marker'
|
import Marker from './components/marker'
|
||||||
import Polyline from './components/polyline'
|
import Polyline from './components/polyline'
|
||||||
|
|||||||
Reference in New Issue
Block a user