version 1.3, 2004/04/18 19:29:08
|
version 1.4, 2004/04/19 10:35:14
|
Line 7 var Red;
|
Line 7 var Red;
|
var Img; |
var Img; |
var state, p1, p2; |
var state, p1, p2; |
|
|
|
// fixing Array.push |
|
if (! Array.prototype.push) { |
|
Array.prototype.push = function(val) { |
|
this[this.length] = val; |
|
} |
|
} |
|
|
function Init() { |
function Init() { |
Selection = -1; |
Selection = -1; |
state = 0; |
state = 0; |
Line 96 function NoRedFrame(spot) {
|
Line 103 function NoRedFrame(spot) {
|
|
|
|
|
function Point(event) { |
function Point(event) { |
this.pageX = parseInt(event.pageX); |
var x, y; |
this.pageY = parseInt(event.pageY); |
if (event) { |
|
// Netscape |
|
x = parseInt(event.pageX); |
|
y = parseInt(event.pageY); |
|
} else { |
|
// IE4 |
|
x = parseInt(window.event.clientX); |
|
y = parseInt(window.event.clientY); |
|
} |
|
this.pageX = x; |
|
this.pageY = y; |
this.x = this.pageX - parseInt(Img.x); |
this.x = this.pageX - parseInt(Img.x); |
this.y = this.pageY - parseInt(Img.y); |
this.y = this.pageY - parseInt(Img.y); |
return this; |
return this; |
Line 198 function getCoords(event, element, coord
|
Line 215 function getCoords(event, element, coord
|
var p = new Point(event, element); |
var p = new Point(event, element); |
var AR = element.area; |
var AR = element.area; |
var i = 0; |
var i = 0; |
Highlight(coords, Selection, undefined); // unselect last index |
Highlight(coords, Selection, false); // unselect last index |
Selection = -1; |
Selection = -1; |
while (i < coords.length) { |
while (i < coords.length) { |
var coord = coords[i]; |
var coord = coords[i]; |
Line 208 var i = 0;
|
Line 225 var i = 0;
|
} |
} |
i += 1; |
i += 1; |
}; |
}; |
Highlight(coords, Selection, 1); // select new index |
Highlight(coords, Selection, true); // select new index |
} |
} |
|
|
function Link() { |
function Link() { |
Line 263 function highlightPair(name, highlight)
|
Line 280 function highlightPair(name, highlight)
|
javaHandler=""" |
javaHandler=""" |
function installHandlers() { |
function installHandlers() { |
%s |
%s |
// event handler für Img installieren |
if (Img.obj.addEventListener) { |
|
// event handler fuer Img installieren |
Img.obj.addEventListener("mousemove", onMouseMove, true); |
Img.obj.addEventListener("mousemove", onMouseMove, true); |
Img.obj.addEventListener("mousedown", Link, true); |
Img.obj.addEventListener("mousedown", Link, true); |
// event handler für Red installieren |
// event handler fuer Red installieren |
Red.obj.addEventListener("mousemove", onMouseMove, true); |
Red.obj.addEventListener("mousemove", onMouseMove, true); |
Red.obj.addEventListener("mousedown", Link, true); |
Red.obj.addEventListener("mousedown", Link, true); |
|
} else { |
|
//Img.obj.captureEvents(Event.MOUSEMOVE); |
|
Img.obj.onmousemove = onMouseMove; |
|
//Red.obj.captureEvents(Event.MOUSEMOVE); |
|
Red.obj.onmousemove = onMouseMove; |
|
} |
}; |
}; |
""" |
""" |
|
|