MediaWiki:Wikiminiatlas.js: Difference between revisions
no edit summary
(allow to remotecontrol the opening of a WMA) |
No edit summary |
||
Line 284: | Line 284: | ||
highlight(-1); | highlight(-1); | ||
break; | break; | ||
case ' | case 'toggle' : | ||
coord_list[parseInt(d[1])].mb.click(); | coord_list[parseInt(d[1])].mb.click(); | ||
break; | break; | ||
case 'scroll' : | case 'scroll' : | ||
$("html:not(:animated),body:not(:animated)").animate({ scrollTop: $(coord_list[parseInt(d[1])].obj).offset().top - 20 + (d[2]||0) }, 500 ); | $("html:not(:animated),body:not(:animated)").animate({ scrollTop: $(coord_list[parseInt(d[1])].obj).offset().top - 20 + parseInt(d[2]||0) }, 500 ); | ||
iframe.div.css( { top: yPos( coord_list[parseInt(d[1])].obj ) + 'px'} ); | iframe.div.css( { top: yPos( coord_list[parseInt(d[1])].obj ) + 'px'} ); | ||
// make sure scroll target gets highlighted | // make sure scroll target gets highlighted |