On Wed, 2006-03-08 at 14:46 +0100, Jean-Marc Lasgouttes wrote:
> >>>>> "Martin" == Martin Vermeer <[EMAIL PROTECTED]> writes:
> 
> Martin> The second chunk allows positioning inbetween two abutting
> Martin> nestinsets, rather than inside either/or (test with [(a)(b)]
> Martin> ):
> 
> Martin> [ ...[nesti]|[nesti+1]...] -- ^ here (inert sliver)
> 
> To solve cleanly this problem, would it be possible to test whether
> the position found inside the nestinset is closer or not from the x
> target than the outside position? What I mean is that introducing a
> margin should not be possible, all the information exists.
> 
> I am not sure what I say is very clear :)

No, but that won't stop me: apparently you want

@@ -1023,7 +1023,9 @@
        if (dist_min == 0) {
                // hit inside cell
                for (pos_type i = 0, n = ar.size(); i < n; ++i)
-                       if (ar[i]->covers(x, y))
+                       // Provide an extra inert sliver to get in-between:
+                       if (ar[i]->covers(x, y) 
+                               && x >= ar[i]->xo() + ar[i]->width() / 4)
                                return ar[i].nucleus()->editXY(cur, x, y);
        }
        return this;

Yes, this is better. Tested and does the job.

Shall I commit it?

- Martin

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to