1 line
647 B
JavaScript
1 line
647 B
JavaScript
"use strict";function e(e){var t=$(e).parents(".pane");return 0===t.size()&&(t=$(".item-views")),{width:t.width(),height:t.height()}}function t(t){var i=e(t.getDOMNode());t.setProps({paneWidth:i.width,paneHeight:i.height})}var i=function(e){return e&&e.__esModule?e["default"]:e},$=i(require("jquery")),n={setupPaneResizeEventMixin:function(){function i(n){try{var r=e(n.getDOMNode());(r.width!==n.props.paneWidth||r.height!==n.props.paneHeight)&&t(n),n.requestID=window.requestAnimationFrame(function(){i(n)})}catch(o){console.log(o)}}i(this)},cleanupPaneResizeEventMixin:function(){window.cancelAnimationFrame(this.requestID)}};module.exports=n; |