But it's *not* the start of the range. And if you're going to say start
and end, you may as well rename anchor and active to start and end. :)
Jamie
On 9/12/2015 5:50 AM, Alexander Surkov wrote:
a small change to make things clearer?
"However, in case of selection, when the user selects backwards (e.g.
pressing shift+left arrow in a text field), the start of the range is
the active point, as the user moves this to manipulate the selection."
On Sun, Dec 6, 2015 at 11:02 PM, James Teh <[email protected]
<mailto:[email protected]>> wrote:
Hi Alex,
The interface/method looks fine. Just one comment on the
documentation:
+ * One of the range points is an anchor, a start of the range,
and another one
+ * is a range end, which typically coincides with the user focus.
I think we need to be careful about the words "start" and "end"
here. In the usual case, anchor will be less than active. However,
if the user is selecting backwards, active will be less than
anchor. Even if active < anchor, I still see the lesser number as
being the "start" of the "range". This is one of the reasons I
preferred start, end and a boolean for the anchor/active
determination, though I realise that seems like a pointless waste
of bytes.
Maybe we could say something like:
The "anchor" is one point of the range and typically remains
constant. The other point is the "active" point, which
typically corresponds to the user's focus or point of
interest. The user moves the active point to expand or
collapse the range. In most cases, anchor is the start of the
range and active is the end. However, when selecting backwards
(e.g. pressing shift+left arrow in a text field), the start of
the range is the active point, as the user moves this to
manipulate the selection.
The other problem is that unless you're dealing with something
like selection, the terms anchor and active don't make a huge
amount of sense, since neither point is the "anchor". I realise
that selection is the primary use case, but it seems like this
range struct is trying to be more generic than this.
we could name them start and end then, and document that in case of
selection 'start' is a selection anchor, 'end' is a active selection
boundary.
Jamie
On 4/12/2015 10:57 PM, Alexander Surkov wrote:
Jamie, Andres, all could you please to take a look at the
proposal and comment it out here?
Thanks!
Alex.
[1]
http://git.linuxfoundation.org/?p=a11y/ia2.git;a=commitdiff;h=85deaf1a1514f0c5e6a59e8c9b6606abfb6e6813
--
James Teh
Executive Director, NV Access Limited
Ph+61 7 3149 3306 <tel:%2B61%207%203149%203306>
www.nvaccess.org <http://www.nvaccess.org>
Facebook:http://www.facebook.com/NVAccess
Twitter: @NVAccess
SIP:[email protected] <mailto:[email protected]>
--
James Teh
Executive Director, NV Access Limited
Ph +61 7 3149 3306
www.nvaccess.org
Facebook: http://www.facebook.com/NVAccess
Twitter: @NVAccess
SIP: [email protected]
_______________________________________________
Accessibility-ia2 mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2