Code Monkey home page Code Monkey logo

Comments (2)

tavlima avatar tavlima commented on June 4, 2024

Actually, I fixed this issue localy, by adding the backgroundSize style in the block below:

wrap = $('<div></div>').css({
    display:'block',
    background:'url("'+this.src+'")',
    backgroundSize:'100%',
    position:'relative',
    padding:0,
    width:this.width,
    height:this.height
});

This fixed the background stuff and is working well, except for the <canvas>, that still has the original image size, breaking all my layout. This resized image problem seems important, to me. Automatic mapping points recalculation would be a really nice feature too. (I'm doing it by myself, currently. Let me know if you need my code)

from maphilight.

SeanCC avatar SeanCC commented on June 4, 2024

I'm having a similar enough issue that I don't think it's necessary to open a new issue. In my own project that I'm using maphilight in, I need the image to be resized every now and then, and this doesn't seem to play well with maphilight. I haven't yet taken the time to go all the way through the maphilight code, so I'll post a solution for the problem once I come up with one, if tavlima doesn't have a solution.

from maphilight.

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.