From 7cb8f306fba65d320e5d4529c3ecb1b40fb0d0e4 Mon Sep 17 00:00:00 2001 From: Silvio Date: Tue, 25 Jun 2013 17:08:28 -0300 Subject: Allow full timeline dimension --- timelinejs.module | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/timelinejs.module b/timelinejs.module index 76a579c..5cc9d55 100644 --- a/timelinejs.module +++ b/timelinejs.module @@ -215,6 +215,15 @@ function timelinejs($nid = NULL, $width = '960px', $height = '500px') { $source = $base_url .'/timelinejs/json/'. (int) $nid; } + // Determine dimensions + if ($width == 'full') { + $width = '100%'; + } + + if ($height == 'full') { + $height = '100%'; + } + return theme('timelinejs', array( 'width' => $width, 'height' => $height, -- cgit v1.2.3