react-i13n
Advanced tools
Comparing version 2.0.9 to 2.0.10
@@ -10,2 +10,7 @@ /** | ||
var subscribe = require('subscribe-ui-event').subscribe; | ||
var DEFAULT_VIEWPORT_MARGINS = { | ||
usePercent: false, | ||
top: 20, | ||
bottom: 20 | ||
}; | ||
@@ -34,3 +39,4 @@ /* Viewport mixin assumes you are on browser and already have the scroll lib */ | ||
var rect = element.getBoundingClientRect(); | ||
var viewportMargins = this.props.viewport.margins; | ||
var viewportMargins = Object.assign({}, DEFAULT_VIEWPORT_MARGINS, | ||
(this.props.viewport && this.props.viewport.margins) || {}); | ||
var margins; | ||
@@ -61,14 +67,2 @@ if (viewportMargins.usePercent) { | ||
getDefaultProps: function () { | ||
return { | ||
viewport: { | ||
margins: { | ||
usePercent: false, | ||
top: 20, | ||
bottom: 20 | ||
} | ||
} | ||
}; | ||
}, | ||
subscribeViewportEvents: function () { | ||
@@ -75,0 +69,0 @@ this.subscription = subscribe('scrollEnd', this._detectViewport); |
@@ -45,3 +45,2 @@ /* global process */ | ||
return Object.assign({}, { | ||
model: null, | ||
i13nModel: null, | ||
@@ -72,5 +71,3 @@ isLeafNode: false, | ||
// delete the props that only used in this level | ||
props.model = undefined; | ||
props.i13nModel = undefined; | ||
props.viewport = undefined; | ||
@@ -77,0 +74,0 @@ return React.createElement( |
{ | ||
"name": "react-i13n", | ||
"description": "React I13n provides a performant and scalable solution to application instrumentation.", | ||
"version": "2.0.9", | ||
"version": "2.0.10", | ||
"main": "index.js", | ||
@@ -45,5 +45,4 @@ "repository": { | ||
"promise": "^7.0.1", | ||
"react": "^0.14.0-rc1", | ||
"react-dom": "^0.14.0-rc1", | ||
"react-tools": "<= 0.13.x", | ||
"react": "^15.0.0-rc.1", | ||
"react-dom": "^15.0.0-rc.1", | ||
"xunit-file": "^0.0.7" | ||
@@ -58,4 +57,4 @@ }, | ||
"peerDependencies": { | ||
"react": "^0.14.0 || 0.14.0-rc1", | ||
"react-dom": "^0.14.0 || 0.14.0-rc1" | ||
"react": "^0.14.0 || ^15.0.0-rc.1", | ||
"react-dom": "^0.14.0 || ^15.0.0-rc.1" | ||
}, | ||
@@ -62,0 +61,0 @@ "precommit": [ |
26
74535
1770