Coder Social home page Coder Social logo

Comments (6)

eregnier avatar eregnier commented on July 1, 2024

I think i had this issue before. This is vue dom management related. I wrapped my custom markers into an extra div within the map tag to solve the issue. This is because i think vue js does not succeed with generation looped content with slots dom content. On my side i dont know how what to do to handle this but i should try to wrap my slot tag of the component template into an extra div. I have to find a reproducible code to test it.

from vue2-gmap-custom-marker.

eregnier avatar eregnier commented on July 1, 2024

I forgot that there is already a wrapping div in the component. I do not succeed in reproducing the error (maybe it is a good thing) so, you may just wrap the custom markers components in a div. Let me know if this works. As I told you, the problem may be that you do a v-for on the component directly and so vuejs does not manage this properly. Let me know if the wrapping div solves the issue.

This is I think a sibbling node issue. the dom in the v5x is simply binded to the marker dom and so it is managed by your filter directly and no more inside the component.

from vue2-gmap-custom-marker.

ColossalPercy avatar ColossalPercy commented on July 1, 2024

Apologies, after a PC shutdown the error has gone, must have been a strange caching issue.

When I apply the filter there is no issue, but as I remove the filter and the markers start to re-appear I get an error:

gmap-custom-marker.vue?ad03:55 Uncaught (in promise) TypeError: Cannot read property 'offsetWidth' of undefined at Overlay.draw (gmap-custom-marker.vue?ad03:55) at eval (gmap-custom-marker.vue?ad03:13)`

This doesn't cause an actual issue in the app, just the error in the console.
Live demo: https://colossalpercy.github.io/reninsane/map/
Source: https://github.com/ColossalPercy/reninsane-viewer-map/blob/master/src/components/TheMap.vue

from vue2-gmap-custom-marker.

eregnier avatar eregnier commented on July 1, 2024

Thank you for your time providing a reproducable bug project.
I checked out your code and it appears that in the new version of the component, the remove dom management is not well implemented. I will fix this asap to make it work properly.
This issue is mainly related to the fact that in the new version the dom is shared from container parent to child whereas it was previously a dom copy and clean was properly implmented for this version.

from vue2-gmap-custom-marker.

eregnier avatar eregnier commented on July 1, 2024

I solved the bug. 6cb1999

it seems to fix the bug in for your project.

Is it ok on your side ?

from vue2-gmap-custom-marker.

ColossalPercy avatar ColossalPercy commented on July 1, 2024

Fixed. That's perfect thanks.

from vue2-gmap-custom-marker.

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.