Skip to content
Guillaume Leclerc edited this page Dec 18, 2015 · 1 revision

propsBinder(vueElement, googleMapsElement, options)

Description

This function create a binding (either two way or one way). Between properties of a Vue element and a Google Maps object.

For one way binding the implementation is straightforward but for two way there is the problem of circular dependency: The google maps update -> warn the vue element (which change) -> warn the Google Map object. It leads to infinite loops.

To overcome this I use revision number for each value. Each time one of the component receives an update it increase its version number. And if its version number is bigger than the other it warn it.

In order to have only one variable and avoid the fact of having huge version number. I used the difference between the two version number (called stable in the code).

Parameters

  • vueElement The vue element to bind
  • googleMapsElement: The google map object to bind
  • props: a props object (the same signature as the props in the vue components). Be careful to add the type attribute to Objects because otherwise deep changes will not be sent.

Components

... More to come

Global methods

Global objects

Internals

(for contributors)

Utils

Clone this wiki locally