Polygons directive not watching visible property
The uiGmapPolygons directive is not hiding/showing when the visible property of the model is modified. What am I doing wrong here?
http://plnkr.co/edit/EhFihJRBK9Lb0s3mwMSl
Polylines also. Toggle visible not working on demo page now.
https://rawgit.com/angular-ui/angular-google-maps/master/example/example.html
The polylines example http://plnkr.co/edit/dVpNl7kTdDDf2jWkApH2?p=preview I'm using v2.0.11.
The problem is that I have set property like draggable to false. This will trigger an early return in polylines-parent-model.coffee
setChildScope: (childScope, model) =>
_.each @scopePropNames, (name) =>
nameKey = name + 'Key'
newValue = if @[nameKey] == 'self' then model else model[@[nameKey]]
if(newValue != childScope[name])
childScope[name] = newValue
childScope.model = model
So it should be
setChildScope: (childScope, model) =>
_.each @scopePropNames, (name) =>
nameKey = name + 'Key'
newValue = if @[nameKey] == 'self' then model else model[@[nameKey]]
if(newValue != childScope[name])
childScope[name] = newValue
return true
childScope.model = model
It can fix the problem in v2.0.11, but it seems not to be the root cause this bug for v2.0.12.
Ill try and look into it. I would try playing with develop. As that is what I am mainly using. However if I were to release it. It would really be considered a 2.1.X.
This is not surprising for polylines and polygons as they are the same code. Nice example as it is still failing on the first round for the toggles. It works afterwards though.
Confirmed.. looking into it.
http://plnkr.co/edit/3HoutKlQWMk51cPB1v8y fixed