sizing correction for dragging

This commit is contained in:
daboe01
2016-09-28 16:15:31 +02:00
parent 4e14ad7821
commit 39d01a1da8
+5 -1
View File
@@ -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];