lib/groupdocs/document/annotation.rb in groupdocs-1.1.0 vs lib/groupdocs/document/annotation.rb in groupdocs-1.2.0
- old
+ new
@@ -37,23 +37,17 @@
# Compatibility with response JSON
alias_method :annotationGuid=, :guid=
# Human-readable accessors
- alias_method :session_guid, :sessionGuid
- alias_method :session_guid=, :sessionGuid=
- alias_method :document_guid, :documentGuid
- alias_method :document_guid=, :documentGuid=
- alias_method :creator_guid, :creatorGuid
- alias_method :creator_guid=, :creatorGuid=
- alias_method :reply_guid, :replyGuid
- alias_method :reply_guid=, :replyGuid=
- alias_method :created_on, :createdOn
- alias_method :created_on=, :createdOn=
- alias_method :annotation_position, :annotationPosition
- alias_method :annotation_position=, :annotationPosition=
- alias_method :position, :annotation_position
+ alias_accessor :session_guid, :sessionGuid
+ alias_accessor :document_guid, :documentGuid
+ alias_accessor :creator_guid, :creatorGuid
+ alias_accessor :reply_guid, :replyGuid
+ alias_accessor :created_on, :createdOn
+ alias_accessor :annotation_position, :annotationPosition
+ alias_accessor :position, :annotationPosition
#
# Creates new GroupDocs::Document::Annotation.
#
# @raise [ArgumentError] If document is not passed or is not an instance of GroupDocs::Document
@@ -247,9 +241,16 @@
request[:access] = access
request[:method] = :PUT
request[:path] = "/ant/{{client_id}}/annotations/#{guid}/markerPosition"
request[:request_body] = { x: x, y: y }
end.execute!
+
+ if box
+ box.x = x
+ box.y = y
+ else
+ self.box = { x: x, y: y }
+ end
end
#
# Sets access mode.
#