Index: issuu.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/issuu/issuu.module,v
retrieving revision 1.22
diff -u -p -r1.22 issuu.module
--- issuu.module	21 Oct 2010 07:41:09 -0000	1.22
+++ issuu.module	22 Oct 2010 13:18:57 -0000
@@ -1,6 +1,12 @@
 <?php
 // $Id: issuu.module,v 1.22 2010/10/21 07:41:09 marvil07 Exp $
 
+
+// Default boundaries for the flash display.
+define('ISSUU_DEFAULT_WIDTH', 420);
+define('ISSUU_DEFAULT_HEIGHT', 297);
+
+
 include_once dirname(__FILE__) . '/issuu.api.inc';
 
 /**
@@ -217,6 +223,20 @@ function issuu_widget_form_builder($defa
     '#options' => issuu_document_types(),
     '#disabled' => $disabled,
   );
+  $form['issuu_width'] = array(
+    '#type' => (in_array('issue_width', $invisible_items)) ? 'hidden' : 'textfield',
+    '#title' => t('Width'),
+    '#default_value' => !empty($default_values['issuu_width']) ? $default_values['issuu_width'] : 420,
+    '#description' => t('Width of the actual Issuu display (default is 420)'),
+    '#disabled' => $disabled,
+  );
+  $form['issuu_height'] = array(
+    '#type' => (in_array('issue_height', $invisible_items)) ? 'hidden' : 'textfield',
+    '#title' => t('Height'),
+    '#default_value' => !empty($default_values['issuu_height']) ? $default_values['issuu_height'] : 297,
+    '#description' => t('Height of the actual Issuu display (default is 297)'),
+    '#disabled' => $disabled,
+  );
   $form['issuu_explicit'] = array(
     '#type' => (in_array('issuu_explicit', $invisible_items)) ? 'hidden' : 'radios',
     '#title' => t('Explicit content'),
@@ -437,6 +457,10 @@ function theme_issuu_formatter_ffpagefli
   if (empty($data)) {
     return '';
   }
+
+  $width = empty($element['#node']->{$element['#field_name']}[0]['data']['issuu_width']) ? ISSUU_DEFAULT_WIDTH : $element['#node']->{$element['#field_name']}[0]['data']['issuu_width'];
+  $height = empty($element['#node']->{$element['#field_name']}[0]['data']['issuu_height']) ? ISSUU_DEFAULT_HEIGHT : $element['#node']->{$element['#field_name']}[0]['data']['issuu_height'];
+
   $options = array(
     'params' => array(
       'allowfullscreen' => 'true',
@@ -450,8 +474,8 @@ function theme_issuu_formatter_ffpagefli
       'docName' => $data['name'],
       'username' => $data['username'],
       'loadingInfoText' => $data['title'],
-      'width' => '420',
-      'height' => '297',
+      'width' => $width,
+      'height' => $height,
       'jsAPIClientDomain' => $base_url,
     ),
   );
@@ -464,6 +488,10 @@ function theme_issuu_formatter_ffpresent
   if (empty($data)) {
     return '';
   }
+
+  $width = empty($element['#node']->{$element['#field_name']}[0]['data']['issuu_width']) ? ISSUU_DEFAULT_WIDTH : $element['#node']->{$element['#field_name']}[0]['data']['issuu_width'];
+  $height = empty($element['#node']->{$element['#field_name']}[0]['data']['issuu_height']) ? ISSUU_DEFAULT_HEIGHT : $element['#node']->{$element['#field_name']}[0]['data']['issuu_height'];
+
   $options = array(
     'params' => array(
       'allowfullscreen' => 'true',
@@ -478,8 +506,8 @@ function theme_issuu_formatter_ffpresent
       'docName' => $data['name'],
       'username' => $data['username'],
       'loadingInfoText' => $data['title'],
-      'width' => '420',
-      'height' => '297',
+      'width' => $width,
+      'height' => $height,
       'jsAPIClientDomain' => $base_url,
     ),
   );
