-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[master] infoWindow does not update content based on $scope variables #354
Comments
What branch and a jsbjn or fiddle w the similar issue would help. |
Master branch correct? |
Correct, I was using the master branch. I had not found time to prepare the jfiddle till today sorry. |
Is there a branch where this problem is solved? |
Have you guys tried replacing references besides just updating the data on the same reference? Also is there a jsbin with this issue already? |
I came across the same issue and created a plunker to show the exact problem |
I've verified this is true on develop as well. Both with a value and a reference. http://plnkr.co/edit/JIFneB5rzcgK42gL8BJM?p=preview |
Anyone want this? |
I could take a look, but likely not until Sunday. |
Done |
I haven't been able to determine root cause on this yet, I'm suspecting though that the window is cloning the compiled element we pass them and therefore angular no longer has a reference to it, but I haven't been able to prove it. I can just see that the content in the window does not change, but the content in the directive does. |
I am pretty sure #382 and this are dupes. It is probably related to show as using "show" is required now to get a Window visible. |
BTW has anyone tries replacing the Window Reference? It may not be enough to change scope variables. Depends on how deep the watch is. |
@nmccready I tried replacing a property on an object (versus a scalar) and an object itself, to no effect. |
crap, well I'll get to it after I do 154, and 74. |
Which directives are causing the issue? markers w windows? or markers w window? If anyone is using markers with windows.. I again will stress against this. markers w window is way better performance and memory wise. Especially if you only need to show a few (1 or more where starting from close) at a time based on click. The only time windows is optimal is if you need all the windows open from the start. Or if your using Windows as your (css markers that are windows) markers. |
In my plunker I am only using a window. But in ticket #382, I'm using markers w window. |
For posterity, I have a plnkr demonstrating that it's an issue with the way html is being compiled into the infowindow content. http://plnkr.co/edit/z9Ab89kbkHmFC2AXzTnD?p=preview . Not sure what to do about it at this point, but root cause is known now. |
Issue #382 and this may go hand in hand. I am looking at 382 now but I may resolve this at the same time. |
@cthrax if you continue on this, I would fix this in develop only. |
@franklindner can you verify the same issue on the develop branch. |
Ok this is with window, can anyone verify the issues with windows, and window, and windows inside marker or markers? |
I am almost 100% positive this is the same issue as #382 |
I take that back this is an issue |
I think @cthrax and myself have narrowed the issue down. One of us will get to it this evening. |
We may have to do something similar to this (search for slit wrists) http://stackoverflow.com/questions/19304559/how-to-watch-the-dom-for-changes-angularjs . However we will be just checking for element.html() differences. |
I have some of it fixed, so far window is fixed. Still working on windows |
@cthrax did you get anywhere with this as well? |
@nmccready I did not. I tried watching the dom tree of the attached element and it did not fire on changes. Then I saw that you had fixed that part of it, so I didn't revisit. |
@cthrax I figured it out and the fix is crazy simple for windows. I wish I would have thought of it before! |
window fixed windows needs to pass interpolation down to the child as a service. This needs to be called to evaluate the old html to the new. version number fixed in package.json ChildWindow position fix - opts.position is now always updated when coords or element is changed windows directive interpolation - compiling is now initially forced into a fakeElement.html function This allows the same logical structure to flow from Windows as from Window Parent Models.
fixed via 8f286b1 |
Nice, just always compile it. Hindsight is 20/20, but I'm feeling a little bit like "duh" now. |
Hi, FYI: Does anyone else got this issue too? |
@knitzie please create a new issue. |
I want to show the distance and duration between two markers in an infoWindow. Those variables are getting updated every 10 seconds as a result of a request and changing marker positions. I can print out $scope.distance.duration it is getting updated nicely but the infoWindow never shows them.
HTML:
Distance: {{ distanceMatrix.distance.text }} | Duration: {{ distanceMatrix.duration.text }}
Could this be an issue or am I just doing it wrong?
The text was updated successfully, but these errors were encountered: