Method: Vis::Timeline#zoom_in

Defined in:
lib/vis/timeline.rb

#zoom_in(percentage, options = {}, &block) ⇒ Object



127
128
129
130
131
132
133
134
135
136
137
138
139
# File 'lib/vis/timeline.rb', line 127

def zoom_in(percentage, options = {}, &block)
  native_options = options_to_native(options)
  if block_given?
    callback = %x{
      function() {
        return block.$call();
      }
    }
    @native.JS.zoomIn(percentage, native_options, callback)
  else
    @native.JS.zoomIn(percentage, native_options)
  end
end