Giter Site home page Giter Site logo

Comments (6)

jeromelachaud avatar jeromelachaud commented on August 28, 2024

Hi, could you share your project source code?

from freelancer-theme.

vitovalov avatar vitovalov commented on August 28, 2024

yes sure!
You can see it here
The exact commit
I have very little experience with web development and as you will see I inserted the map div with absolute height and managed to have it on the right of the post's image.
In order to handle the modal opened event, I'm using boostrap's show combined with a 500ms timeout.
Things aren't smooth when a modal is opened and scrolled, but it works fine with first post.

However, if you see the second post, the streetview div is not loaded. I cannot see the reason for that.

It would be perfect if you could also help me with google map divs positioning. I want them on the right of the post image with correct height.

Thanks!

from freelancer-theme.

jeromelachaud avatar jeromelachaud commented on August 28, 2024

what is the div id="pano" for?

from freelancer-theme.

vitovalov avatar vitovalov commented on August 28, 2024

It's for streetview I guess. I've used official google sample

from freelancer-theme.

MrCsabaToth avatar MrCsabaToth commented on August 28, 2024

I've displayed Google Charts and other contents like what you have which require the div sized properly when it is measured. The solution to your problem is probably to defer the Google Maps code until the modal dialog is shown. Fortunately Bootstrap has built-in event for that: https://getbootstrap.com/javascript/#js-events

$('#myModal').on('shown.bs.modal', function (e) {
  if (!data) return e.preventDefault() // stops modal from being shown
})

Same goes for Boostrap popover, it has a shown event.

from freelancer-theme.

MrCsabaToth avatar MrCsabaToth commented on August 28, 2024

I'm not familiar with RoR or Jekyll, so I cannot tell you right away where/how to incorporate this handler.

from freelancer-theme.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.