r20526 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r20525‎ | r20526 | r20527 >
Date:16:43, 16 March 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
Removed resize event for timeline. The way it is done, it should not do much good anyway in case there are many
timelines on one page. But everything seems to work without it.
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/skins/SMW_timeline.js (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/skins/SMW_timeline.js
@@ -4,9 +4,9 @@
55 */
66
77 addEvent(window, "load", smw_timeline_init);
8 -addEvent(window, "resize", onResize);
 8+//addEvent(window, "resize", onResize);
99
10 -var tl;
 10+var smwtl;
1111
1212 //addOnLoadHook(smw_timeline_init);
1313
@@ -119,7 +119,7 @@
120120 })
121121 }
122122
123 - tl = Timeline.create(div, bandInfos);
 123+ smwtl = Timeline.create(div, bandInfos);
124124 }
125125
126126 function smw_get_bandwidth(number,count) {
@@ -254,12 +254,13 @@
255255 evs._events.add(evt);
256256 }
257257
 258+//FIXME: Not used at the moment. Is this needed?
258259 var resizeTimerID = null;
259260 function onResize() {
260261 if (resizeTimerID == null) {
261262 resizeTimerID = window.setTimeout(function() {
262263 resizeTimerID = null;
263 - tl.layout();
 264+ smwtl.layout();
264265 }, 500);
265266 }
266267 }

Status & tagging log