You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 30, 2018. It is now read-only.
My goal is to show only one open window at a time. Thus, having window.show bound to m.doShow (where m is the marker field doShow evals to true or false). I also tried using a parent scope via using doShow(maker) = function { self.active_marker.index === marker.index} . In any case both resulted to the $scope.watch of 'show()' always evaluating newValue and oldValue as equal. This appears to be a bug with angular itself.
Never-mind I have narrowed this down to being a value vs. reference problem on having certain fields copied over. I have the window show stuff working now by leaving the model's reference intact (without overwriting with a copy). This allows for the show() tracking (watch) to work correctly. However now I have other problems with drawing. This is with where relying on the model being replaced by a copy does not allow the icon to be updated.
This problem surrounds the design of how markers and windows are integrated. Markers will not be redrawn by the google maps api unless the marker is destroyed. This requires the reference to be over written (causes destroy and recreate) with the current design.
However when you do this any other properties that are requiring state changes via scope.watch will not work for each marker. This is because the state has been reset on each overwrite with a new reference. Therefore newValue is always equal to oldValue. So the dilemma here, is how do we redraw a marker without deleting it and keep the scope tracking intact?
My goal is to show only one open window at a time. Thus, having window.show bound to m.doShow (where m is the marker field doShow evals to true or false). I also tried using a parent scope via using doShow(maker) = function { self.active_marker.index === marker.index} . In any case both resulted to the $scope.watch of 'show()' always evaluating newValue and oldValue as equal. This appears to be a bug with angular itself.
See here.
angular/angular.js#2621
The text was updated successfully, but these errors were encountered: