lib/vedeu/cursor/move.rb in vedeu-0.4.60 vs lib/vedeu/cursor/move.rb in vedeu-0.4.61
- old
+ new
@@ -175,36 +175,25 @@
# @return [String]
attr_reader :name
private
- # Returns the cursors x position based on its current offset.
- #
- # @return [Fixnum]
- def x_position
- coordinate.x_position(ox)
- end
-
- # Returns the cursors y position based on its current offset.
- #
- # @return [Fixnum]
- def y_position
- coordinate.y_position(oy)
- end
-
# @return [Vedeu::Coordinate]
def coordinate
- @coordinate ||= Vedeu::Coordinate.new(name)
+ @coordinate ||= Vedeu::Coordinate.new(name, oy, ox)
end
# @see Vedeu::Cursors#by_name
def cursor
@cursor ||= Vedeu.cursors.by_name(name)
end
# @return [Hash<Symbol => void>]
def cursor_attributes
- cursor.attributes.merge!(x: x_position, y: y_position, ox: ox, oy: oy)
+ cursor.attributes.merge!(x: coordinate.x_position,
+ y: coordinate.y_position,
+ ox: ox,
+ oy: oy)
end
# @see Vedeu::Geometries#by_name
def geometry
@geometry ||= Vedeu.geometries.by_name(name)