-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make text tool label more configurable via ACEDrawingViewDelegate; fix several bugs #1
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
ACEDrawingView/ACEDrawingLabelView.m
Outdated
|
||
_globalInsets = CGSizeMake(12, 12); | ||
_closeButtonOffset = CGPointMake(0, 0); | ||
_rotateButtonOffset = CGPointMake(0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] We could use CGPointZero
_labelView.textColor = self.lineColor; | ||
_labelView.fontName = self.drawingView.draggableTextFontName ?: [UIFont systemFontOfSize:_labelView.fontSize].fontName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity: Is there a special reason why the order was swapped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly just aesthetics.
This is a copy of ACEDrawingView#96 for internal review by Asana.
Some people (i.e. me) want to customize several aspects of ACEDrawingLabelView which are not currently exposed to users of the framework. This PR makes the changes necessary to enable that customization.
ACEDrawingLabelView
has new configurable properties that replace previously hard-coded values:[close|rotate]ButtonOffset
[close|rotate]ButtonSize
[close|rotate]Button
shadow[Color|Opacity|Radius|Offset]
ACEDrawingViewDelegate
has a new optional method which allows the delegate to configure those properties before the label is displayed:[delegate labelViewNeedsConfiguration:label]