- u = @purse.unit - s_mult = @purse.summary_scale - collapse_key ||= nil %i.fa.fa-expand.collapse-expand{ id: "pursesSummary_#{collapse_key}", style: "margin-left: -1em;" } Summary .PurseSummaryW .PurseSummary -## loss .summary-amount .max-gl.long.loss{ style: "height: #{@max_loss_long *-1*s_mult*u}px" } .max-gl.short.loss{ style: "height: #{@max_loss_short *-1*s_mult*u}px" } - if @loss_long .net-gl.loss.long.loss-long{ style: "height: #{@loss_long *-1*s_mult*u}px" } - if @loss_short .net-gl.loss.short.loss-short{ style: "height: #{@loss_short *-1*s_mult*u}px" } .summary-delta .begin.long{ style: "height: #{@begin_delta_long *s_mult*10000*u}px" } .begin.short{ style: "height: #{@begin_delta_short *s_mult*10000*u}px" } .end.long{ style: "height: #{@end_delta_long *s_mult*10000*u}px" } .end.short{ style: "height: #{@end_delta_short *s_mult*10000*u}px" } -## gain .summary-amount .max-gl.long.gain{ style: "height: #{@max_gain_long *s_mult*u}px" } .max-gl.short.gain{ style: "height: #{@max_gain_short *s_mult*u}px" } - if @gain_long .net-gl.gain.long.gain-long{ style: "height: #{@gain_long *s_mult*u}px" } - if @gain_short .net-gl.gain.short.gain-short{ style: "height: #{@gain_short *s_mult*u}px" } .legendW .legend %ul %li exposure long: #{pp_amount @max_loss_long *-1} short: #{pp_amount @max_loss_short *-1} %li max loss long: #{pp_amount [ @max_loss_long + @max_gain_short, 0].min } short: #{pp_amount [ @max_loss_short + @max_gain_long, 0].min } %li.gray max gain long: #{pp_amount @max_gain_long} short: #{pp_amount @max_gain_short} %li %hr gain long: #{pp_amount @gain_long} short: #{pp_amount @gain_short} %li loss long: #{pp_amount @loss_long} short: #{pp_amount @loss_short} %li %hr begin D long: #{pp_delta @begin_delta_long} short: #{pp_delta @begin_delta_short} net: #{pp_delta @begin_delta_long - @begin_delta_short} %li end D long: #{pp_delta @end_delta_long} short: #{pp_delta @end_delta_short} net: #{pp_delta @end_delta_long - @end_delta_short}