Skip to content
This repository has been archived by the owner on May 16, 2019. It is now read-only.

Commit

Permalink
Merge pull request #1805 from OpenBazaar/fixDisappearingMap
Browse files Browse the repository at this point in the history
Remove clip attribute that was hiding the map.
  • Loading branch information
rmisio committed Oct 12, 2016
2 parents eeb01cd + 7ae7821 commit 386f375
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion js/templates/buyWizard.html
@@ -1,6 +1,6 @@
<div class="modal-hero js-buyWizardHero custCol-text shadow-inner1-light"
style="background-image: url(<%= ob.serverUrl %>get_image?hash=<%= ob.vendor_offer.listing.item.image_hashes[0] %><%= ob.imageExtension %>), url(imgs/defaultBanner.png);">
<div class="js-buyWizardMap buyWizardMap positionRelative hide" style="height: 262px">
<div class="js-buyWizardMap buyWizardMap positionRelative hide" style="height: 250px">
<div class="js-mapSpinner txt-col1 ion-android-sync spinner spinner-slow icon-large icon-circle-background1 zIndex1 fullCentered" style="border: 1px solid #aaa;"></div>
<div class="flexContainer mapWrap"></div>
</div>
Expand Down
8 changes: 5 additions & 3 deletions js/views/buyWizardVw.js
Expand Up @@ -398,15 +398,16 @@ module.exports = baseModal.extend({
$currentIframe = this.$buyWizardMap.find('iframe');
$currentIframe.addClass('blurMore');

if (address && address.street && address.city && address.state && address.postal_code) {
addressString = address.street + ", " + address.city + ", " + address.state + " " + address.postal_code + " " + address.displayCountry;
if (address) {
addressString = address.street + " " + address.city + " " + address.state + " " + address.postal_code + " " + address.displayCountry;
addressString = addressString.trim();
} else {
// if address is invalid, we'll create a dummy address for which google maps will show a map of the world
addressString = "123 Street, City, State 12345 Country";
}

addressString = encodeURIComponent(addressString);
var $iFrame = $('<iframe class="js-iframe-pending positionTop" width="525" height="250" frameborder="0" style="border:0; margin-top: 0; height: 250px; clip: rect(0,0,0,0)" />');
var $iFrame = $('<iframe class="js-iframe-pending positionTop" width="525" height="250" frameborder="0" style="border:0; margin-top: 0; height: 250px; clip: rect(0,525px,250px,0)" />');

if ($currentIframe.length) {
this.$buyWizardMap.find('.js-mapSpinner').removeClass('hide');
Expand Down Expand Up @@ -463,6 +464,7 @@ module.exports = baseModal.extend({
this.showMaps();
if (this.userModel.get('shipping_addresses').length === 0){
this.createNewAddress();
this.displayMap();
$('.js-buyWizardAddressBack').show();
$('.js-buyWizardNewAddressCancel').hide();
}
Expand Down

0 comments on commit 386f375

Please sign in to comment.