Re: [selection-api] Define the visually equivalency. (#6)

I would like to omit visually equivalency from containsNode. Selection.containsNode() should work on DOM tree and Flat tree.

CSSOM should have rectangle or quad based node containment predicate.
Visual based containment on Selection can write as:

// methods are hypothetical 
const nodeQuad = node.getClientQuad()
for (const range : selection.ranges) {
  const rangeQuad = range.getClientQuad();
  if (rangeQuad.intersects(nodeQuad))
   return true;
}
return false;


---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/selection-api/issues/6#issuecomment-197138561

Received on Wednesday, 16 March 2016 03:40:21 UTC