From b8449c8a5a5b9ee9639bc6fa573f55088c8a74fa Mon Sep 17 00:00:00 2001
From: Silvio <silvio@socioambiental.org>
Date: Fri, 3 Aug 2012 16:42:15 -0300
Subject: Dimensions should be configurable

---
 timelinejs.module | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/timelinejs.module b/timelinejs.module
index 340e1ea..7cd5b64 100644
--- a/timelinejs.module
+++ b/timelinejs.module
@@ -115,11 +115,8 @@ function timelinejs_json($nid) {
 
 /**
  * Menu callback.
- *
- * @todo
- *   Dimensions should be configurable.
  */
-function timelinejs($nid) {
+function timelinejs($nid, $width = '960px', $height = '500px') {
   global $language;
   global $theme;
 
@@ -127,8 +124,8 @@ function timelinejs($nid) {
   $css  = (file_exists($path .'/timeline.css')) ? '/'. $path .'/timeline.css' : NULL;
 
   return theme('timelinejs', array(
-    'width'  => '960px',
-    'height' => '500px',
+    'width'  => $width,
+    'height' => $height,
     'source' => '/timelinejs/json/'. (int) $nid,
     'css'    => $css,
     'lang'   => '/sites/all/libraries/timelinejs/compiled/js/locale/'. $language->language .'.js',
-- 
cgit v1.2.3