mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-01 22:25:12 +00:00
refactor shape elements add responder system.
refactor shape elements add responder system. Just iOS.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Copyright (c) 2015-present, Horcrux.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the MIT-style license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "RNSVGRectManager.h"
|
||||
|
||||
#import "RNSVGRect.h"
|
||||
#import "RCTConvert+RNSVG.h"
|
||||
|
||||
@implementation RNSVGRectManager
|
||||
|
||||
RCT_EXPORT_MODULE()
|
||||
|
||||
- (RNSVGRenderable *)node
|
||||
{
|
||||
return [RNSVGRect new];
|
||||
}
|
||||
|
||||
RCT_EXPORT_VIEW_PROPERTY(x, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(y, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(width, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(height, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(rx, NSString)
|
||||
RCT_EXPORT_VIEW_PROPERTY(ry, NSString)
|
||||
|
||||
// fix me: these should inherited from renderable
|
||||
RCT_EXPORT_VIEW_PROPERTY(fill, RNSVGBrush)
|
||||
RCT_EXPORT_VIEW_PROPERTY(fillRule, RNSVGCGFCRule)
|
||||
RCT_EXPORT_VIEW_PROPERTY(stroke, RNSVGBrush)
|
||||
RCT_EXPORT_VIEW_PROPERTY(strokeWidth, CGFloat)
|
||||
RCT_EXPORT_VIEW_PROPERTY(strokeLinecap, CGLineCap)
|
||||
RCT_EXPORT_VIEW_PROPERTY(strokeLinejoin, CGLineJoin)
|
||||
RCT_EXPORT_VIEW_PROPERTY(clipPath, CGPath)
|
||||
RCT_EXPORT_VIEW_PROPERTY(clipRule, RNSVGCGFCRule)
|
||||
RCT_EXPORT_VIEW_PROPERTY(strokeDasharray, RNSVGCGFloatArray)
|
||||
RCT_EXPORT_VIEW_PROPERTY(strokeDashoffset, CGFloat)
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user