\n \n ");_this.items.push(item)});window.addEventListener("scroll",function(){_this.updateItems()});window.addEventListener("resize",function(){_this.updateItems()});this.updateItems()}_createClass(ScrollHint,[{key:"isScrollable",value:function isScrollable(item){var offset=this.opt.offset;var element=item.element;var offsetWidth=element.offsetWidth;return offsetWidth+offsetscrollHintBorderWidth){(0,_util.addClass)(element,scrollableLeftClass)}else{(0,_util.removeClass)(element,scrollableLeftClass)}}},{key:"needSuggest",value:function needSuggest(item){var scrolledIn=item.scrolledIn,interacted=item.interacted;return!interacted&&scrolledIn&&this.isScrollable(item)}},{key:"updateItems",value:function updateItems(){var _this2=this;[].forEach.call(this.items,function(item){_this2.updateItem(item)})}},{key:"updateStatus",value:function updateStatus(item){var _this3=this;var element=item.element,scrolledIn=item.scrolledIn;if(scrolledIn){return}if((0,_util.getOffset)(element).top+element.offsetHeight/2<(0,_util.getScrollTop)()+window.innerHeight){item.scrolledIn=true;if(this.opt.remainingTime!==-1){setTimeout(function(){item.interacted=true;_this3.updateItem(item)},this.opt.remainingTime)}}}},{key:"updateItem",value:function updateItem(item){var opt=this.opt;var element=item.element;var target=element.querySelector('[data-target="scrollable-icon"]');this.updateStatus(item);if(this.isScrollable(item)){(0,_util.addClass)(element,opt.scrollableClass)}else{(0,_util.removeClass)(element,opt.scrollableClass)}if(this.needSuggest(item)){(0,_util.addClass)(target,opt.suggestClass)}else{(0,_util.removeClass)(target,opt.suggestClass)}if(opt.suggestiveShadow){this.checkScrollableDir(item)}}}]);return ScrollHint}();exports.default=ScrollHint;module.exports=exports["default"]},{"./util":3,"es6-object-assign":1}],3:[function(require,module,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});var append=exports.append=function append(element,string){var div=document.createElement("div");div.innerHTML=string;while(div.children.length>0){element.appendChild(div.children[0])}};var addClass=exports.addClass=function addClass(element,className){if(element.classList){element.classList.add(className)}else{element.className+=""+className}};var removeClass=exports.removeClass=function removeClass(element,className){if(element.classList){element.classList.remove(className)}else{element.className=element.className.replace(new RegExp("(^|\\b)"+className.split("").join("|")+"(\\b|$)","gi")," ")}};var getScrollTop=exports.getScrollTop=function getScrollTop(){return window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop||0};var getScrollLeft=exports.getScrollLeft=function getScrollLeft(){return window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft||0};var getOffset=exports.getOffset=function getOffset(el){var rect=el.getBoundingClientRect();return{top:rect.top+getScrollTop(),left:rect.left+getScrollLeft()}}},{}]},{},[2])(2)});