victory-native
Advanced tools
Comparing version 30.3.0 to 30.4.0
# VictoryNative Changelog | ||
## 30.4.0 (2018-08-24) | ||
-[378](https://github.com/FormidableLabs/victory-native/pull/378) - Adds `disableContainerEvents` prop for all native container components | ||
## 30.3.0 (2018-08-24) | ||
@@ -4,0 +8,0 @@ |
import React from "react"; | ||
import PropTypes from "prop-types"; | ||
import Svg from "react-native-svg"; | ||
@@ -10,2 +11,8 @@ import { assign, get } from "lodash"; | ||
export default class extends VictoryContainer { | ||
static propTypes = assign({}, VictoryContainer.propTypes, { | ||
disableContainerEvents: PropTypes.bool, | ||
onTouchEnd: PropTypes.func, | ||
onTouchStart: PropTypes.func | ||
}); | ||
constructor(props) { | ||
@@ -16,2 +23,3 @@ super(props); | ||
getResponder() { | ||
@@ -76,3 +84,5 @@ const yes = () => true; | ||
renderContainer(props, svgProps, style) { | ||
const { title, desc, className, width, height, portalZIndex, responsive } = props; | ||
const { | ||
title, desc, className, width, height, portalZIndex, responsive, disableContainerEvents | ||
} = props; | ||
const children = this.getChildren(props); | ||
@@ -85,4 +95,5 @@ const dimensions = responsive ? { width: "100%", height: "100%" } : { width, height }; | ||
const portalProps = { width, height, viewBox: svgProps.viewBox, style: portalSvgStyle }; | ||
const handlers = disableContainerEvents ? {} : this.panResponder.panHandlers; | ||
return ( | ||
<View {...this.panResponder.panHandlers} style={divStyle} touchAction="box-none" | ||
<View {...handlers} style={divStyle} touchAction="box-none" | ||
className={className} ref={props.containerRef} | ||
@@ -89,0 +100,0 @@ > |
{ | ||
"name": "victory-native", | ||
"version": "30.3.0", | ||
"version": "30.4.0", | ||
"description": "Shared libraries and components for Victory", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
72022
1282