summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--timelinejs.module9
1 files 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',