diff --git a/src/element-pan.js b/src/element-pan.js index e239446..b74b902 100644 --- a/src/element-pan.js +++ b/src/element-pan.js @@ -41,10 +41,10 @@ var ElementPan = React.createClass({ eventListener.add(window, 'mouseup', this.onDragStop); eventListener.add(window, 'touchend', this.onDragStop); - // If we have multiple child nodes, use the scroll[Height/Width] + // If we have any child nodes, use the scroll[Height/Width] // If we have no child-nodes, use bounds to find size of inner content var bounds, target = e.currentTarget || e.target; - if (target.childNodes.length > 1) { + if (target.childNodes.length > 0) { bounds = { width: target.scrollWidth, height: target.scrollHeight }; } else { bounds = e.target.getBoundingClientRect();