| Class | Ym4r::GmPlugin::GControlPosition |
| In: |
lib/gm_plugin/control.rb
|
| Parent: | Struct.new(:anchor,:offset) |
An object representing a position of a control. The first argument of the constructor is one of the following : :top_right, :top_left, :bottom_right, :bottom_left.
# File lib/gm_plugin/control.rb, line 50
50: def create
51: js_anchor = if anchor == :top_right
52: "G_ANCHOR_TOP_RIGHT"
53: elsif anchor == :top_left
54: "G_ANCHOR_TOP_LEFT"
55: elsif anchor == :bottom_right
56: "G_ANCHOR_BOTTOM_RIGHT"
57: else
58: "G_ANCHOR_BOTTOM_LEFT"
59: end
60: "new GControlPosition(#{js_anchor},#{offset})"
61: end