lib/fn/swf/node/photo_block.rb in fn_document-0.9.8 vs lib/fn/swf/node/photo_block.rb in fn_document-0.9.9

- old
+ new

@@ -32,18 +32,24 @@ scale = w.to_f / ow percent = "#{scale * 100}%" h = ow * scale x = case align - when /center/: bx + (bw - w) / 2.0; - when /right/: bx + (bw - w) - else; bx + when /center/ + bx + (bw - w) / 2.0; + when /right/ + bx + (bw - w) + else + bx end y = case align - when /middle/: by + (bh - h) / 2.0; - when /bottom/: by + (bh - h) - else; by + when /middle/ + by + (bh - h) / 2.0; + when /bottom/ + by + (bh - h) + else + by end struct << ".put #{src} x=#{x} y=#{y} scalex=#{percent} scaley=#{percent}" end end \ No newline at end of file