rc-dialog
Advanced tools
Comparing version 4.1.2 to 4.1.3
@@ -60,2 +60,3 @@ 'use strict'; | ||
var dialogDomNode, maskNode; | ||
var transitionName, maskTransitionName; | ||
if (props.visible) { | ||
@@ -68,10 +69,18 @@ this.monitorWindowResize(); | ||
dialogDomNode = React.findDOMNode(this.refs.dialog); | ||
if (props.animation) { | ||
transitionName = props.transitionName; | ||
if (!transitionName && props.animation) { | ||
transitionName = prefixClsFn(props.prefixCls, props.animation + '-enter'); | ||
} | ||
if (transitionName) { | ||
// dialogDomNode.style.visibility = 'hidden'; | ||
anim(dialogDomNode, prefixClsFn(props.prefixCls, props.animation + '-enter')); | ||
anim(dialogDomNode, transitionName); | ||
// dialogDomNode.style.visibility = ''; | ||
} | ||
if (props.maskAnimation) { | ||
maskTransitionName = props.maskTransitionName; | ||
if (!maskTransitionName && props.maskAnimation) { | ||
maskTransitionName = prefixClsFn(props.prefixCls, props.maskAnimation + '-enter'); | ||
} | ||
if (maskTransitionName) { | ||
maskNode = React.findDOMNode(this.refs.mask); | ||
anim(maskNode, prefixClsFn(props.prefixCls, props.maskAnimation + '-enter')); | ||
anim(maskNode, maskTransitionName); | ||
} | ||
@@ -85,8 +94,16 @@ dialogDomNode.focus(); | ||
dialogDomNode = React.findDOMNode(this.refs.dialog); | ||
if (props.animation) { | ||
anim(dialogDomNode, prefixClsFn(props.prefixCls, props.animation + '-leave')); | ||
transitionName = props.transitionName; | ||
if (!transitionName && props.animation) { | ||
transitionName = prefixClsFn(props.prefixCls, props.animation + '-leave'); | ||
} | ||
if (props.maskAnimation) { | ||
if (transitionName) { | ||
anim(dialogDomNode, transitionName); | ||
} | ||
maskTransitionName = props.maskTransitionName; | ||
if (!maskTransitionName && props.maskAnimation) { | ||
maskTransitionName = prefixClsFn(props.prefixCls, props.maskAnimation + '-leave'); | ||
} | ||
if (maskTransitionName) { | ||
maskNode = React.findDOMNode(this.refs.mask); | ||
anim(maskNode, prefixClsFn(props.prefixCls, props.maskAnimation + '-leave')); | ||
anim(maskNode, maskTransitionName); | ||
} | ||
@@ -93,0 +110,0 @@ } |
@@ -104,3 +104,3 @@ 'use strict'; | ||
var props = this.props; | ||
var dialogProps = copy(props, ['className', 'closable', 'align', 'title', 'footer', 'animation', 'maskAnimation', 'prefixCls', 'style', 'width', 'height', 'zIndex']); | ||
var dialogProps = copy(props, ['className', 'closable', 'align', 'title', 'footer', 'animation', 'transitionName', 'maskAnimation', 'maskTransitionName', 'prefixCls', 'style', 'width', 'height', 'zIndex']); | ||
var dialogElement = React.createElement( | ||
@@ -107,0 +107,0 @@ Dialog, |
{ | ||
"name": "rc-dialog", | ||
"version": "4.1.2", | ||
"version": "4.1.3", | ||
"description": "dialog ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -68,2 +68,8 @@ # rc-dialog | ||
#### transitionName | ||
* dialog animation css class name | ||
#### maskTransitionName | ||
* dialog's mask animation css class name | ||
#### title | ||
@@ -70,0 +76,0 @@ * Title of the dialog |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24588
640
138