[ReactNative] Fix warnings w/h => width/height
This commit is contained in:
parent
5e110d2776
commit
59997df1c1
|
@ -355,7 +355,7 @@ var ScrollResponderMixin = {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A helper function to zoom to a specific rect in the scrollview.
|
* A helper function to zoom to a specific rect in the scrollview.
|
||||||
* @param {object} rect Should have shape {x, y, w, h}
|
* @param {object} rect Should have shape {x, y, width, height}
|
||||||
*/
|
*/
|
||||||
scrollResponderZoomTo: function(rect: { x: number; y: number; width: number; height: number; }) {
|
scrollResponderZoomTo: function(rect: { x: number; y: number; width: number; height: number; }) {
|
||||||
RCTUIManagerDeprecated.zoomToRect(this.getNodeHandle(), rect);
|
RCTUIManagerDeprecated.zoomToRect(this.getNodeHandle(), rect);
|
||||||
|
|
|
@ -30,7 +30,7 @@ var ViewStylePropTypes = {
|
||||||
overflow: ReactPropTypes.oneOf(['visible', 'hidden']),
|
overflow: ReactPropTypes.oneOf(['visible', 'hidden']),
|
||||||
shadowColor: ReactPropTypes.string,
|
shadowColor: ReactPropTypes.string,
|
||||||
shadowOffset: ReactPropTypes.shape(
|
shadowOffset: ReactPropTypes.shape(
|
||||||
{h: ReactPropTypes.number, w: ReactPropTypes.number}
|
{width: ReactPropTypes.number, height: ReactPropTypes.number}
|
||||||
),
|
),
|
||||||
shadowOpacity: ReactPropTypes.number,
|
shadowOpacity: ReactPropTypes.number,
|
||||||
shadowRadius: ReactPropTypes.number,
|
shadowRadius: ReactPropTypes.number,
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var dummySize = {w: undefined, h: undefined};
|
var dummySize = {width: undefined, height: undefined};
|
||||||
|
|
||||||
var sizesDiffer = function(one, two) {
|
var sizesDiffer = function(one, two) {
|
||||||
one = one || dummySize;
|
one = one || dummySize;
|
||||||
two = two || dummySize;
|
two = two || dummySize;
|
||||||
return one !== two && (
|
return one !== two && (
|
||||||
one.w !== two.w ||
|
one.width !== two.width ||
|
||||||
one.h !== two.h
|
one.height !== two.height
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue