maschek / imgmap

Javascript based imagemap editor
https://www.maschek.hu/imagemap/
GNU General Public License v2.0
59 stars 33 forks source link

Title of each area was loose. #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I use Firefox 3.0.13 on Ubuntu 9.04
2. When I show html code on front page I have attribute "title" of each
area but when my page was loaded already , I use
alert(document.getElementsByTagName("map")[0].innerHTML) on any position in
file imgmap.js(especialy on top of function imgmap.prototype.onLoad), I
found the titles of each area were loose.
3. In the end I think it loose in this function 
Function.prototype.bind = function(object) {
    var method = this;
    return function () {
        return method.apply(object, arguments);
    };
};
Because in the bottom of function imgmap.prototype.setup() I test these codes
alert("before "+document.getElementsByTagName("map")[0].innerHTML);
this.addEvent(window, 'load', this.onLoad.bind(this));
alert("after "+document.getElementsByTagName("map")[0].innerHTML);

In the line alert("before ".... I found title of each area
but in the line alert("after ".... I not found title

What is the expected output? What do you see instead?
-I want to use "title" attribute for show tooltip, I don't use alt because
I have a reason for more javascript.

What version of the product are you using? On what browser/operating system?
-I use latest version of imgmap (2.2-108)

Please provide any additional information below.
-

Original issue reported on code.google.com by i.am.the...@gmail.com on 26 Aug 2009 at 6:31

GoogleCodeExporter commented 9 years ago
I am not sure i understand what you are trying to achieve here. Can you show an
example page?

Original comment by adam.mas...@gmail.com on 28 Aug 2009 at 10:23

GoogleCodeExporter commented 9 years ago
OK ahh in the view mode, I want to use title of each area to show tooltip of 
some
javascript library.But when the page was loaded already, the alt value is 
assigned to
title value, it change my title value so I dont want this action.(Before load 
the
page I use php xml function  read image map code and change title value to my
format-little code of html format).

Conclude: I want to use title attribute in my little html code not alt value.

I go to see imgmap.js and I found position the problem point, and I said 
already above.

Thank you very much.

Original comment by i.am.the...@gmail.com on 29 Aug 2009 at 4:36