Skip to content

Commit

Permalink
Improving curve_to expert sample
Browse files Browse the repository at this point in the history
No need to use each_with_index on xy.
  • Loading branch information
IanTrudel committed Feb 21, 2017
1 parent f72d1e6 commit 7c9ad1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/expert-curve-control-points.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
move_to *xy[0]

@controller = nil
xy.each_with_index { |val, index|
(@controllers ||= []) << oval(:left => val[0], :top => val[1], :radius => 10, :center => true)
xy.each { |n|
(@controllers ||= []) << oval(:left => n[0], :top => n[1], :radius => 10, :center => true)
}
@controllers.each_with_index { |n, index|
n.click do |btn, left, top|
Expand Down

0 comments on commit 7c9ad1b

Please sign in to comment.