mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-20 09:20:41 +00:00
sizing correction for dragging
This commit is contained in:
@@ -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