mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-16 21:41:18 +00:00
sizing correction for dragging
This commit is contained in:
1 parent
4e14ad7821
commit
39d01a1da8
1 file changed
+5
-1
@@ -942,7 +942,11 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
_movingSelection = CPMaxRange(_startTrackingLocation, 0);
|
||||
var dragPlaceholder = [CPTextField new],
|
||||
originPoint = [_layoutManager locationForGlyphAtIndex:[self selectedRange].location];
|
||||
|
||||
|
||||
originPoint.y -= [_layoutManager _descentAtLocation:_selectionRange.location];
|
||||
originPoint.x += _textContainerOrigin.x;
|
||||
originPoint.y += _textContainerOrigin.y;
|
||||
|
||||
[dragPlaceholder setStringValue:[[self stringValue] substringWithRange:_selectionRange]];
|
||||
[dragPlaceholder sizeToFit];
|
||||
|
||||
|
||||
Reference in new issue
Block a user