Skip to content

Commit

Permalink
Don't infowindow, instead hide it in the dom. Fixes #27
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanfprice committed Dec 7, 2014
1 parent e7244d1 commit 6a50a19
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
8 changes: 8 additions & 0 deletions examples/partials/infowindows.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ <h1 id="infowindows">InfoWindows</h1>
</div>

<style id="infowindows.css">
[gm-info-window] {
display: none;
}

.map [gm-info-window] {
display: block;
}

.map {
height: 300px;
}
Expand Down
13 changes: 0 additions & 13 deletions src/directives/gmInfoWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,6 @@
});
});
});

/* The info window's contents dont' need to be on the dom anymore,
google maps has them stored. So we just replace the infowindow
element with an empty div. (we don't just straight remove it from
the dom because straight removing things from the dom can mess up
angular) */
element.replaceWith('<div></div>');

//Decorate infoWindow.open to $compile contents before opening
var _open = infoWindow.open;
infoWindow.open = function open(map, anchor) {
_open.call(infoWindow, map, anchor);
};
}

return {
Expand Down

0 comments on commit 6a50a19

Please sign in to comment.