Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r19464: LJSUP-9240: Incorrectly size of embeds a...

Committer: gariev
LJSUP-9240: Incorrectly size of embeds at the preview page

U   trunk/cgi-bin/LJ/EmbedModule.pm
Modified: trunk/cgi-bin/LJ/EmbedModule.pm
===================================================================
--- trunk/cgi-bin/LJ/EmbedModule.pm	2011-07-12 06:03:25 UTC (rev 19463)
+++ trunk/cgi-bin/LJ/EmbedModule.pm	2011-07-12 06:24:19 UTC (rev 19464)
@@ -293,7 +293,7 @@
     $moduleid += 0;
 
     # parse the contents of the module and try to come up with a guess at the width and height of the content
-    my $content = $class->module_content(moduleid => $moduleid, journalid => $journalid);
+    my $content = $class->module_content(moduleid => $moduleid, journalid => $journalid, preview => $opts{'preview'});
     my $preview = $opts{preview};
     my $width = 0;
     my $height = 0;
@@ -314,7 +314,6 @@
 
             if ($type eq "S") {
                 my ($elewidth, $eleheight);
-
                 if ($attr->{width}) {
                     $elewidth = $attr->{width}+0;
                     $width = $elewidth if $elewidth > $width;
@@ -361,10 +360,6 @@
                 }
             }
         }
-
-        # add padding
-        # $width += 50 if $width;
-        # $height += 50 if $height;
     }
 
     # use explicit values if we have them

Tags: gariev, livejournal, pm
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments