Git Product home page Git Product logo

Comments (3)

summerstyle avatar summerstyle commented on July 29, 2024

Hi, chrjs.

Yes, the specification https://www.w3.org/TR/2011/WD-html5-20110525/the-map-element.html allows negative values of coords for html image maps.

from summer.

chrjs avatar chrjs commented on July 29, 2024

Thank you Vera. I see, quite surprising...
Since we don't have this requirement in our editor, we would like to have the movement blocked on the image edges. Is there any possibility to have this option implemented? How much it will cost?
Thanks.

from summer.

summerstyle avatar summerstyle commented on July 29, 2024

For the editor, negative coordinates is normal, but now I am making big refactoring of the editor.
I want to divide coords library (for drawing/editing/loading/saving/exporting areas) from the editor.
Then users will can simply create many editors on one page in their projects.

This option is possible,maybe, as parameter, something like this:

var editor = new Editor(url, containerEl, {
    isMovableOutsideCanvas: true
});

But, i don't know, when it happens - I have not enough time.

You can add checking for negative coordinates in process of moving here:
https://github.com/summerstyle/summer/blob/master/summerHTMLImageMapCreator.js#L856
like this:

this.setCoords(Area.getMovingNormalizedCoords(this.edit('move', dx, dy))).redraw();

and for all types of areas static method for normalizing coords like this:
https://github.com/summerstyle/summer/blob/master/summerHTMLImageMapCreator.js#L1388

from summer.

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.