lib/canis/core/include/layouts/stacklayout.rb in canis-0.0.8 vs lib/canis/core/include/layouts/stacklayout.rb in canis-0.0.10

- old
+ new

@@ -2,11 +2,11 @@ # File: stacklayout.rb # Description: # Author: j kepler http://github.com/mare-imbrium/canis/ # Date: 2014-05-08 - 18:33 # License: MIT -# Last update: 2014-05-09 19:58 +# Last update: 2017-03-09 23:14 # ----------------------------------------------------------------------------- # # stacklayout.rb Copyright (C) 2012-2014 j kepler require 'canis/core/include/layouts/abstractlayout' # ---- # This does a simple stacking of objects. Or all objects. @@ -24,11 +24,11 @@ # in case user does not wish to add objects, but wishes to specify the weightage on one, # send in the widget and its weightage. # # @param [Widget] widget whose weightage is to be specified - # @param [Float, Fixnum] weightage for the given widget (@see add_with_weight) + # @param [Float, Integer] weightage for the given widget (@see add_with_weight) def weightage item, wt @wts[item] = wt end @@ -77,10 +77,10 @@ $log.debug " looping 3 #{e.name} " e.row = r e.col = c wt = @wts[e] if wt - if wt.is_a? Fixnum + if wt.is_a? Integer e.height = wt elsif wt.is_a? Float e.height = (wt * balance_ht).floor end else