Class: Leaflet::Draw::Rails::Testing::Rectangle

Inherits:
Shape
  • Object
show all
Defined in:
lib/leaflet-draw-rails/rectangle.rb

Instance Method Summary collapse

Methods inherited from Shape

#initialize, #on

Constructor Details

This class inherits a constructor from Leaflet::Draw::Rails::Testing::Shape

Instance Method Details

#draw!Object



9
10
11
12
13
14
# File 'lib/leaflet-draw-rails/rectangle.rb', line 9

def draw!
  @browser.move_to(*@points.first)
  @browser.click_and_hold
  @browser.move_to(*@points.second)
  @browser.release
end