Ouvrir le menu principal

Modifications

MediaWiki:Common.js

458 octets ajoutés, 9 juillet 2013 à 00:54
aucun résumé de modification
function drawPosition(context, xPos, yPos, rate)
{
console.log('drawing');
var size = 50 * rate;
var x = xPos * size;
function mouseActionPosition(e)
{
console.log('mouseActionPosition');
var $this = $(this),
context = $this.data('context'),
if($(hilightDivMarker).length && $('<canvas>')[0].getContext)
{
$(hilightDivMarker).each(function(index)
{
var mainDiv = $(this);
});
var mapData = $(".mapData", img.attr('id')).text().split(":"); if(mapData) {console.log(mapData); mapData[2] = w / mapData[2]; $(".smwtable tr:not(:has(td.Localisation)):has(td.Position)").each(function() { var pos = $("td.Position", this).text(); var xPos = (pos.substr(0, pos.indexOf(':')) - mapData[0]); var yPos; var map = 1; var parenthesis = pos.indexOf('('); if(parenthesis > -1) { yPos = (pos.substring(pos.indexOf(':')+1, parenthesis-1) - mapData[1]); map = pos.substring(parenthesis+1, pos.indexOf('e')); } else { yPos = (pos.substring(pos.indexOf(':')+1) - mapData[1]); } if(map == index+1) { $(this).bind('mouseover mouseout', mouseActionPosition).data('context', context).data('xPos', mapData[0]xPos).data('yPos', mapData[1]yPos).data('rate', mapData[2]); } }); }
});
}