RE: [sensors] the near/far event names

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 UTC