📝 Improve DisplayBuffer::findMarkers docs

This commit is contained in:
Nathan Sobo
2014-03-06 12:31:55 -07:00
parent aff37d1ae4
commit f0837bb98b

View File

@@ -522,12 +522,28 @@ class DisplayBuffer extends Model
findMarker: (attributes) ->
@findMarkers(attributes)[0]
# Finds all valid markers satisfying the given attributes
# Public: Find all markers satisfying a set of parameters.
#
# attributes - The attributes against which to compare the markers' attributes
# There are some reserved keys that match against derived marker properties:
# startBufferRow - The buffer row at which the marker starts
# endBufferRow - The buffer row at which the marker ends
# params -
# An {Object} containing parameters that all returned markers must satisfy.
# Unreserved keys will be compared against the markers' custom properties.
# There are also the following reserved keys with special meaning for the
# query:
# :startBufferRow -
# A {Number}. Only returns markers starting at this row in buffer
# coordinates.
# :endBufferRow -
# A {Number}. Only returns markers ending at this row in buffer
# coordinates.
# :containsBufferRange -
# A {Range} or range-compatible {Array}. Only returns markers containing
# this range in buffer coordinates.
# :containsBufferPosition -
# A {Point} or point-compatible {Array}. Only returns markers containing
# this position in buffer coordinates.
# :containedInBufferRange -
# A {Range} or range-compatible {Array}. Only returns markers contained
# within this range.
#
# Returns an {Array} of {DisplayBufferMarker}s
findMarkers: (attributes) ->