Changeset 5115 in project


Ignore:
Timestamp:
07/16/07 07:47:48 (13 years ago)
Author:
azul
Message:

Bug fix: if the image was smaller than the default size, this extension now uses the largest render instead of assuming it was rendered for the default size.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • stream-wiki/trunk/extensions/image.scm

    r5114 r5115  
    116116            (last (string-split path "/")))))
    117117
     118(define (svnwiki-image-default-size env)
     119  (let ((sizes (svnwiki-image-sizes-env env)))
     120    (if (member *svnwiki-image-sizes-default* sizes)
     121      *svnwiki-image-sizes-default*
     122      (last sizes))))
     123
    118124(define (svnwiki-image-handler-render env)
    119125  (let-from-environment env (initial-header-depth path-in path static-url)
     
    129135        ((div id (format #f "svnwikiImageSizes~A" random-id)))
    130136        ((script type "text/javascript" src (format #f "~A/xsvnwiki-helper/image/image" static-url)))
    131         ((img src (format #f "~A-~A" (last (string-split path "/")) *svnwiki-image-sizes-default*)
     137        ((img src (format #f "~A-~A" (last (string-split path "/")) (svnwiki-image-default-size env))
    132138              id (format #f "svnwikiImage~A" random-id)
    133139              ; TODO: Use svnwiki:title as the alt parameter.
Note: See TracChangeset for help on using the changeset viewer.