This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Trying out a new syntax. It is: | |
| // | |
| // - not magical except for the DecoratedComponent bit | |
| // - communicates that it returns props | |
| // - ...that are computed from Redux data | |
| // - resembles familiar functions like getInitialProps | |
| // - nice aesthetically | |
| @connect(data => X.DecoratedComponent.getDataProps(data)) | |
| export default class X extends React.Component { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| extension UIBezierPath { | |
| class func getAxisAlignedArrowPoints(inout points: Array<CGPoint>, forLength: CGFloat, tailWidth: CGFloat, headWidth: CGFloat, headLength: CGFloat ) { | |
| let tailLength = forLength - headLength | |
| points.append(CGPointMake(0, tailWidth/2)) | |
| points.append(CGPointMake(tailLength, tailWidth/2)) | |
| points.append(CGPointMake(tailLength, headWidth/2)) | |
| points.append(CGPointMake(forLength, 0)) | |
| points.append(CGPointMake(tailLength, -headWidth/2)) |
NewerOlder