slate-react
Advanced tools
Comparing version 0.10.10 to 0.10.11
@@ -34,3 +34,3 @@ 'use strict'; | ||
var parent = el.parentNode; | ||
var scroller = window; | ||
var scroller = void 0; | ||
@@ -51,2 +51,4 @@ while (!scroller) { | ||
if (!scroller) return window; | ||
return scroller; | ||
@@ -76,3 +78,3 @@ } | ||
if (isWindow) { | ||
var _innerWidth = scroller.innerWidth, | ||
var innerWidth = scroller.innerWidth, | ||
innerHeight = scroller.innerHeight, | ||
@@ -82,3 +84,3 @@ pageYOffset = scroller.pageYOffset, | ||
width = _innerWidth; | ||
width = innerWidth; | ||
height = innerHeight; | ||
@@ -102,3 +104,3 @@ yOffset = pageYOffset; | ||
var x = left < yOffset || innerWidth + xOffset < left ? left - width / 2 : xOffset; | ||
var x = left < yOffset || width + xOffset < left ? left - width / 2 : xOffset; | ||
@@ -110,4 +112,4 @@ var y = top < yOffset || height + yOffset < top ? top - height / 2 : yOffset; | ||
} else { | ||
scroller.scrollTop = scroller.scrollTop + y; | ||
scroller.scrollLeft = scroller.scrollLeft + x; | ||
scroller.scrollTop = y; | ||
scroller.scrollLeft = x; | ||
} | ||
@@ -114,0 +116,0 @@ } |
{ | ||
"name": "slate-react", | ||
"description": "A set of React components for building completely customizable rich-text editors.", | ||
"version": "0.10.10", | ||
"version": "0.10.11", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "repository": "git://github.com/ianstormtaylor/slate.git", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
15145
744163