}
});
+ $(window).scroll(function() {
+ if ($(window).scrollTop() > $('.content-heading').outerHeight() + $('#top-bar').outerHeight() ) {
+ $('#changeset_list_map_wrapper').addClass('scrolled');
+ } else {
+ $('#changeset_list_map_wrapper').removeClass('scrolled');
+ }
+ });
+
var params = OSM.mapParams();
if (params.bbox) {
map.fitBounds([[params.minlat, params.minlon],
}
}
+#changeset_list_map_wrapper {
+ position: absolute;
+ width: 50%;
+ height: 490px;
+ top: 0;
+ right: 0;
+}
+
+#changeset_list_map_wrapper.scrolled {
+ position: fixed;
+}
+
#changeset_list_map {
position: absolute;
bottom: 20px;
top: 20px;
right: 20px;
- width: 45%;
- min-height: 398px;
- max-height: 598px;
+ left: 20px;
border: 1px solid #ccc;
}
+#changeset_list_map_wrapper.scrolled #changeset_list_map {
+ margin-left: 93px;
+}
+
/* Rules for the data browser */
.browse-section {
<%= render :partial => 'changeset_paging_nav' %>
<% if @edits.size > 0 %>
- <%= render :partial => 'map' %>
+ <div id='changeset_list_map_wrapper'>
+ <%= render :partial => 'map' %>
+ </div>
<div class='column-1'>
<%= render :partial => 'changesets', :locals => { :showusername => !params.has_key?(:display_name) } %>
</div>