pasteboard snip-sizing repairs
svn: r14464 original commit: 0e7e85269d1cbee351831094d8c793d39b55b7d2
This commit is contained in:
parent
2e537cd062
commit
b311d7ed1b
|
@ -337,7 +337,7 @@
|
||||||
[f? #f])
|
[f? #f])
|
||||||
(set-box! f? (find-dot loc x y dx dy))
|
(set-box! f? (find-dot loc x y dx dy))
|
||||||
(set! sizedxm dx)
|
(set! sizedxm dx)
|
||||||
(set! sizedxm dy)
|
(set! sizedym dy)
|
||||||
(when f?
|
(when f?
|
||||||
(set! resizing snip))
|
(set! resizing snip))
|
||||||
(init-dragging event)))))
|
(init-dragging event)))))
|
||||||
|
@ -1102,11 +1102,11 @@
|
||||||
;; ----------------------------------------
|
;; ----------------------------------------
|
||||||
|
|
||||||
(define/private (find-dot loc x y dxm dym)
|
(define/private (find-dot loc x y dxm dym)
|
||||||
(define (check-y)
|
(define (check-y can-mid?)
|
||||||
(cond
|
(cond
|
||||||
[(inbox? (loc-y loc) y)
|
[(inbox? (loc-y loc) y)
|
||||||
(set-box! dym -1) #t]
|
(set-box! dym -1) #t]
|
||||||
[(inbox? (loc-vm loc) y)
|
[(and can-mid? (inbox? (loc-vm loc) y))
|
||||||
(set-box! dym 0) #t]
|
(set-box! dym 0) #t]
|
||||||
[(inbox? (loc-b loc) y)
|
[(inbox? (loc-b loc) y)
|
||||||
(set-box! dym 1) #t]
|
(set-box! dym 1) #t]
|
||||||
|
@ -1114,13 +1114,13 @@
|
||||||
(cond
|
(cond
|
||||||
[(inbox? (loc-x loc) x)
|
[(inbox? (loc-x loc) x)
|
||||||
(set-box! dxm -1)
|
(set-box! dxm -1)
|
||||||
(check-y)]
|
(check-y #t)]
|
||||||
[(inbox? (loc-hm loc) x)
|
[(inbox? (loc-hm loc) x)
|
||||||
(set-box! dxm 0)
|
(set-box! dxm 0)
|
||||||
(check-y)]
|
(check-y #f)]
|
||||||
[(inbox? (loc-r loc) x)
|
[(inbox? (loc-r loc) x)
|
||||||
(set-box! dxm 1)
|
(set-box! dxm 1)
|
||||||
(check-y)]
|
(check-y #t)]
|
||||||
[else #f]))
|
[else #f]))
|
||||||
|
|
||||||
(def/public (find-snip [real? x] [real? y] [(make-or-false snip%) [after #f]])
|
(def/public (find-snip [real? x] [real? y] [(make-or-false snip%) [after #f]])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user