W3C home > Mailing lists > Public > public-device-apis@w3.org > May 2012

RE: [sensors] the near/far event names

From: Doug Turner <dougt@mozilla.com>
Date: Fri, 11 May 2012 19:38:52 -0700 (PDT)
Message-ID: <91bs9j1pl5rwuu3o0a50c94u.1336790354680@email.android.com>
To: "Tran, Dzung D" <dzung.d.tran@intel.com>
Cc: Doug Turner <doug.turner@gmail.com>, Marcos Caceres <marcosscaceres@gmail.com>, public-device-apis@w3.org
Without a reference, the percentages don't mean anything.

"Tran, Dzung D" <dzung.d.tran@intel.com> wrote:

Instead of min and max, can we map into a scale of 0 to 1? 
So, just return

e.value = 0.2
e.proximity = near

or
e.value = 0.8
e.proximity = far

This also solve the fingerprinting issue.

Thanks,
Dzung Tran


-----Original Message-----
From: Doug Turner [mailto:doug.turner@gmail.com] 
Sent: Friday, May 11, 2012 10:37 AM
To: Marcos Caceres
Cc: public-device-apis@w3.org
Subject: Re: [sensors] the near/far event names


On May 11, 2012, at 10:26 AM, Marcos Caceres wrote:

> What about going with what Robin suggested:  
> 
> window.addEventListener("proximity", function(e){});
> 
> And the Event:
> 
> e.min ...
> e.max ...
> e.value ...
> e.proximity = "far" || "near" ? 


The drawback of this is that if you were just looking for changes in proximity, you might get many other events that aren't significant.  It probably isn't that big of a deal.  It would also allow savoy web developers to determine what the UA's definition of near and far is.

I am happy if we just add this as an optional attribute and move.

Thoughts?
Received on Saturday, 12 May 2012 02:39:22 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 12 May 2012 02:39:24 GMT