app/views/iro/positions/roll.haml in iron_warbler-2.0.7.20 vs app/views/iro/positions/roll.haml in iron_warbler-2.0.7.21
- old
+ new
@@ -1,9 +1,9 @@
-- unit = u = 50 # pixels per dollar
-- grid_size = 100 # dollars to each side of origin
+- u = @purse.unit # 50 ## pixels per dollar
- strategy = @position.strategy
+
.purses-gameui.padded
= render '/iro/purses/header', purse: @position.purse
.a
- position = @position
@@ -21,11 +21,11 @@
.StockCoordinatesW
.StockCoordinates
.grid-mark.mark0
.label= nearest_strike
- - (1...grid_size).each_with_index do |idx|
+ - (1...@n_dollars).each_with_index do |idx|
.grid-mark{ class: "mark#{idx}", style: "left: -#{idx * u}px" }
.label
= nearest_strike + idx
.grid-mark{ class: "mark-#{idx}", style: "left: #{idx * u}px" }
.label
@@ -57,10 +57,10 @@
- nearest_strike = stock.last.round
.StockCoordinatesW
.StockCoordinates
.grid-mark.mark0
.label= nearest_strike
- - (1...grid_size).each_with_index do |idx|
+ - (1...@n_dollars).each_with_index do |idx|
.grid-mark{ class: "mark#{idx}", style: "left: -#{idx * u}px" }
.label
= nearest_strike + idx
.grid-mark{ class: "mark-#{idx}", style: "left: #{idx * u}px" }
.label