MediaWiki:Imagemap-Hightlight.js: Unterschied zwischen den Versionen

Zur Navigation springen Zur Suche springen
keine Bearbeitungszusammenfassung
Zeile 45: Zeile 45:
}
}
   
   
function mouseAction(e) {
function viewElement() {
var $this = $(this),
var $this = $(this),
context = $this.data('context'),
context = $this.data('context'),
activate = e.type == 'mouseover',
li = $this.prop('tagName') == 'LI';
li = $this.prop('tagName') == 'LI';
if (li && activate) { // in this case, we need to test visibility vis a vis scrolling
if (li) { // test visibility vis a vis scrolling
var height = $this.height(),
var height = $this.height(),
ol = $this.parent(),
ol = $this.parent(),
Zeile 59: Zeile 58:
$this.toggleClass(liHighlightClass, activate);
$this.toggleClass(liHighlightClass, activate);
context.clearRect(0, 0, context.canvas.width, context.canvas.height);
context.clearRect(0, 0, context.canvas.width, context.canvas.height);
if (activate) {
drawMarker(context, $this.data('areas'));
if ($.client.profile().name === 'msie') { // ie9: dimwit needs to be told twice.
context.clearRect(0, 0, context.canvas.width, context.canvas.height);
drawMarker(context, $this.data('areas'));
drawMarker(context, $this.data('areas'));
if ($.client.profile().name === 'msie') { // ie9: dimwit needs to be told twice.
context.clearRect(0, 0, context.canvas.width, context.canvas.height);
drawMarker(context, $this.data('areas'));
}
}
}
}
}
   
   
Zeile 121: Zeile 120:
.append($('{{a}}', {href: href, title: pageOfHref(href, cssClass), text: text, 'class': cssClass}))
.append($('{{a}}', {href: href, title: pageOfHref(href, cssClass), text: text, 'class': cssClass}))
                                                 .css({fillStyle: 'rgba(0,0,0,0.1)', strokeStyle: 'red', lineJoin: 'round', lineWidth: 2})
                                                 .css({fillStyle: 'rgba(0,0,0,0.1)', strokeStyle: 'red', lineJoin: 'round', lineWidth: 2})
.bind('mouseover mouseout', mouseAction)
                                                .viewElement()
.data('areas', [])
.data('areas', [])
.data('context', context)
.data('context', context)
2.255

Bearbeitungen

Navigationsmenü