react-virtual-list
Advanced tools
Comparing version 1.6.1 to 1.7.1
@@ -1,1 +0,1 @@ | ||
{"filter":false,"title":"package.json","tooltip":"/package.json","undoManager":{"mark":27,"position":27,"stack":[[{"start":{"row":1,"column":29},"end":{"row":1,"column":30},"action":"insert","lines":["-"],"id":1}],[{"start":{"row":1,"column":30},"end":{"row":1,"column":31},"action":"insert","lines":["g"],"id":2}],[{"start":{"row":1,"column":31},"end":{"row":1,"column":32},"action":"insert","lines":["h"],"id":3}],[{"start":{"row":1,"column":32},"end":{"row":1,"column":33},"action":"insert","lines":["-"],"id":4}],[{"start":{"row":1,"column":32},"end":{"row":1,"column":33},"action":"remove","lines":["-"],"id":5}],[{"start":{"row":1,"column":31},"end":{"row":1,"column":32},"action":"remove","lines":["h"],"id":6}],[{"start":{"row":1,"column":30},"end":{"row":1,"column":31},"action":"remove","lines":["g"],"id":7}],[{"start":{"row":1,"column":30},"end":{"row":1,"column":31},"action":"insert","lines":["e"],"id":8}],[{"start":{"row":1,"column":31},"end":{"row":1,"column":32},"action":"insert","lines":["x"],"id":9}],[{"start":{"row":1,"column":32},"end":{"row":1,"column":33},"action":"insert","lines":["a"],"id":10}],[{"start":{"row":1,"column":32},"end":{"row":1,"column":33},"action":"remove","lines":["a"],"id":11}],[{"start":{"row":1,"column":31},"end":{"row":1,"column":32},"action":"remove","lines":["x"],"id":12}],[{"start":{"row":1,"column":31},"end":{"row":1,"column":32},"action":"insert","lines":["x"],"id":13}],[{"start":{"row":1,"column":32},"end":{"row":1,"column":33},"action":"insert","lines":["a"],"id":14}],[{"start":{"row":1,"column":33},"end":{"row":1,"column":34},"action":"insert","lines":["m"],"id":15}],[{"start":{"row":1,"column":34},"end":{"row":1,"column":35},"action":"insert","lines":["p"],"id":16}],[{"start":{"row":1,"column":35},"end":{"row":1,"column":36},"action":"insert","lines":["l"],"id":17}],[{"start":{"row":1,"column":36},"end":{"row":1,"column":37},"action":"insert","lines":["e"],"id":18}],[{"start":{"row":29,"column":22},"end":{"row":30,"column":34},"action":"insert","lines":[","," \"react-virtual-list\": \"^1.5.1\""],"id":19,"ignore":true}],[{"start":{"row":2,"column":0},"end":{"row":3,"column":0},"action":"remove","lines":[" \"version\": \"1.3.1\",",""],"id":20}],[{"start":{"row":2,"column":0},"end":{"row":4,"column":0},"action":"remove","lines":[" \"description\": \"Super simple virtualized list React component\","," \"main\": \"dist/virtual-list.js\",",""],"id":21}],[{"start":{"row":2,"column":0},"end":{"row":5,"column":0},"action":"remove","lines":[" \"directories\": {"," \"test\": \"test\""," },",""],"id":22}],[{"start":{"row":4,"column":0},"end":{"row":5,"column":0},"action":"remove","lines":[" \"test\": \"jasmine-node test --verbose --matchall\"",""],"id":23}],[{"start":{"row":3,"column":72},"end":{"row":3,"column":73},"action":"remove","lines":[","],"id":24}],[{"start":{"row":5,"column":0},"end":{"row":16,"column":0},"action":"remove","lines":[" \"repository\": {"," \"type\": \"git\","," \"url\": \"https://github.com/developerdizzle/react-virtual-list.git\""," },"," \"keywords\": ["," \"react\","," \"virtual\","," \"list\","," \"render\","," \"scroll\""," ],",""],"id":25}],[{"start":{"row":1,"column":29},"end":{"row":1,"column":37},"action":"remove","lines":["-example"],"id":26,"ignore":true},{"start":{"row":2,"column":16},"end":{"row":2,"column":17},"action":"remove","lines":["3"]},{"start":{"row":2,"column":16},"end":{"row":2,"column":17},"action":"insert","lines":["5"]},{"start":{"row":4,"column":16},"end":{"row":4,"column":17},"action":"remove","lines":["v"]},{"start":{"row":4,"column":16},"end":{"row":4,"column":17},"action":"insert","lines":["V"]},{"start":{"row":4,"column":23},"end":{"row":4,"column":25},"action":"remove","lines":["-l"]},{"start":{"row":4,"column":23},"end":{"row":4,"column":24},"action":"insert","lines":["L"]},{"start":{"row":9,"column":14},"end":{"row":9,"column":71},"action":"remove","lines":["browserify -t reactify App.jsx | uglifyjs -c > app.min.js"]},{"start":{"row":9,"column":14},"end":{"row":9,"column":26},"action":"insert","lines":["gulp default"]},{"start":{"row":29,"column":22},"end":{"row":30,"column":34},"action":"remove","lines":[","," \"react-virtual-list\": \"^1.5.1\""]},{"start":{"row":32,"column":0},"end":{"row":33,"column":0},"action":"remove","lines":[" \"browserify\": \"^10.2.1\",",""]},{"start":{"row":34,"column":29},"end":{"row":37,"column":25},"action":"remove","lines":[","," \"reactify\": \"^1.1.1\","," \"run-sequence\": \"^1.1.0\","," \"uglifyjs\": \"^2.4.10\""]}],[{"start":{"row":2,"column":16},"end":{"row":2,"column":17},"action":"remove","lines":["5"],"id":27}],[{"start":{"row":2,"column":16},"end":{"row":2,"column":17},"action":"insert","lines":["6"],"id":28}]]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":2,"column":17},"end":{"row":2,"column":17},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1442600112737,"hash":"358003c410c72945829ef79c2e6d3cf3f1f0c6f9"} | ||
{"filter":false,"title":"package.json","tooltip":"/package.json","undoManager":{"mark":1,"position":1,"stack":[[{"start":{"row":2,"column":16},"end":{"row":2,"column":17},"action":"remove","lines":["6"],"id":2}],[{"start":{"row":2,"column":16},"end":{"row":2,"column":17},"action":"insert","lines":["7"],"id":3}]]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":2,"column":17},"end":{"row":2,"column":17},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1446604201638,"hash":"b11a30abcdadae0401e78a6612b8ce6094cdd5af"} |
@@ -1,1 +0,1 @@ | ||
{"filter":false,"title":"index.js","tooltip":"/src/utils/index.js","undoManager":{"mark":-1,"position":-1,"stack":[]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":21,"column":0},"end":{"row":21,"column":0},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1440267108000,"hash":"062836701e83ef22d19437d3d2bd8577d03aee8c"} | ||
{"filter":false,"title":"index.js","tooltip":"/src/utils/index.js","undoManager":{"mark":-1,"position":-1,"stack":[]},"ace":{"folds":[],"scrolltop":120,"scrollleft":0,"selection":{"start":{"row":21,"column":0},"end":{"row":21,"column":0},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":{"row":11,"state":"no_regex","mode":"ace/mode/javascript"}},"timestamp":1440267108000,"hash":"062836701e83ef22d19437d3d2bd8577d03aee8c"} |
@@ -1,1 +0,1 @@ | ||
{"changed":true,"filter":false,"title":"VirtualList.jsx","tooltip":"/src/VirtualList.jsx","value":"var React = require('react');\nvar utils = require('./utils');\n\nvar VirtualList = React.createClass({\n propTypes: {\n items: React.PropTypes.array.isRequired,\n itemHeight: React.PropTypes.number.isRequired,\n renderItem: React.PropTypes.func.isRequired,\n container: React.PropTypes.object.isRequired,\n tagName: React.PropTypes.string.isRequired,\n scrollDelay: React.PropTypes.number,\n itemBuffer: React.PropTypes.number\n },\n getDefaultProps: function() {\n return {\n container: typeof window !== 'undefined' ? window : undefined,\n tagName: 'div',\n scrollDelay: 0,\n itemBuffer: 0\n };\n },\n getVirtualState: function(props) {\n // default values\n var state = {\n items: [],\n bufferStart: 0,\n height: 0\n };\n \n // early return if nothing to render\n if (typeof props.container === 'undefined' || props.items.length === 0 || props.itemHeight <= 0 || !this.isMounted()) return state;\n \n var items = props.items;\n \n state.height = props.items.length * props.itemHeight;\n\n var viewBox = this.viewBox(props);\n \n // no space to render\n if (viewBox.height <= 0) return state;\n \n viewBox.top = utils.viewTop(props.container);\n viewBox.bottom = viewBox.top + viewBox.height;\n \n var listBox = this.listBox(props);\n\n var renderStats = VirtualList.getItems(viewBox, listBox, props.itemHeight, items.length, props.itemBuffer);\n \n // no items to render\n if (renderStats.itemsInView.length === 0) return state;\n\n state.items = items.slice(renderStats.firstItemIndex, renderStats.lastItemIndex + 1);\n state.bufferStart = renderStats.firstItemIndex * props.itemHeight;\n \n return state;\n },\n getInitialState: function() {\n return this.getVirtualState(this.props);\n },\n shouldComponentUpdate: function(nextProps, nextState) {\n if (this.state.bufferStart !== nextState.bufferStart) return true;\n\n if (this.state.height !== nextState.height) return true;\n \n var equal = utils.areArraysEqual(this.state.items, nextState.items);\n \n return !equal;\n },\n viewBox: function viweBox(nextProps) {\n return (this.view = this.view || this._getViewBox);\n },\n _getViewBox: function _getViewBox(nextProps) {\n return {\n height: typeof nextProps.container.innerHeight !== 'undefined' ? nextProps.container.innerHeight : nextProps.container.clientHeight\n };\n },\n _getListBox: function(nextProps) {\n var list = this.getDOMNode();\n\n var top = utils.topDifference(list, nextProps.container);\n \n var height = nextProps.itemHeight * nextProps.items.length;\n \n return {\n top: top,\n height: height,\n bottom: top + height\n };\n },\n listBox: function listBox(nextProps) {\n return (this.list = this.list || this._getListBox(nextProps));\n },\n componentWillReceiveProps: function(nextProps) {\n // clear caches\n this.view = this.list = null;\n\n var state = this.getVirtualState(nextProps);\n\n this.props.container.removeEventListener('scroll', this.onScrollDebounced);\n\n this.onScrollDebounced = utils.debounce(this.onScroll, nextProps.scrollDelay, false);\n \n nextProps.container.addEventListener('scroll', this.onScrollDebounced);\n \n this.setState(state);\n },\n componentWillMount: function() {\n this.onScrollDebounced = utils.debounce(this.onScroll, this.props.scrollDelay, false);\n },\n componentDidMount: function() {\n var state = this.getVirtualState(this.props);\n \n this.setState(state);\n \n this.props.container.addEventListener('scroll', this.onScrollDebounced);\n },\n componentWillUnmount: function() {\n this.props.container.removeEventListener('scroll', this.onScrollDebounced);\n \n this.view = this.list = null;\n },\n onScroll: function() {\n var state = this.getVirtualState(this.props);\n \n this.setState(state);\n },\n // in case you need to get the currently visible items\n visibleItems: function() {\n return this.state.items;\n },\n render: function() {\n return (\n <this.props.tagName {...this.props} style={{boxSizing: 'border-box', height: this.state.height, paddingTop: this.state.bufferStart }} >\n {this.state.items.map(this.props.renderItem)}\n </this.props.tagName>\n );\n }\n});\n\nVirtualList.getBox = function getBox(view, list) {\n list.height = list.height || list.bottom - list.top;\n \n return {\n top: Math.max(0, Math.min(view.top - list.top)),\n bottom: Math.max(0, Math.min(list.height, view.bottom - list.top))\n };\n};\n\nVirtualList.getItems = function(viewBox, listBox, itemBuffer, itemHeight, itemCount) {\n if (itemCount === 0 || itemHeight === 0) return {\n itemsInView: 0\n };\n \n // list is below viewport\n if (viewBox.bottom < listBox.top) return {\n itemsInView: 0\n };\n \n // list is above viewport\n if (viewBox.top > listBox.bottom) return {\n itemsInView: 0\n };\n \n var listViewBox = VirtualList.getBox(viewBox, listBox);\n \n //todo add itemBuffer here instead\n var firstItemIndex = Math.max(0, Math.floor(listViewBox.top / itemHeight) - itemBuffer);\n var lastItemIndex = Math.min(itemCount, Math.ceil(listViewBox.bottom / itemHeight) + itemBuffer) - 1;\n \n var itemsInView = lastItemIndex - firstItemIndex + 1;\n\n var result = {\n firstItemIndex: firstItemIndex,\n lastItemIndex: lastItemIndex,\n itemsInView: itemsInView,\n };\n \n return result;\n};\n\nmodule.exports = VirtualList;","undoManager":{"mark":99,"position":100,"stack":[[{"start":{"row":149,"column":33},"end":{"row":149,"column":34},"action":"insert","lines":["o"],"id":1809}],[{"start":{"row":149,"column":34},"end":{"row":149,"column":35},"action":"insert","lines":["x"],"id":1810}],[{"start":{"row":149,"column":35},"end":{"row":149,"column":36},"action":"insert","lines":[","],"id":1811}],[{"start":{"row":149,"column":36},"end":{"row":149,"column":37},"action":"insert","lines":[" "],"id":1812}],[{"start":{"row":149,"column":37},"end":{"row":149,"column":38},"action":"insert","lines":["l"],"id":1813}],[{"start":{"row":149,"column":38},"end":{"row":149,"column":39},"action":"insert","lines":["i"],"id":1814}],[{"start":{"row":149,"column":39},"end":{"row":149,"column":40},"action":"insert","lines":["s"],"id":1815}],[{"start":{"row":149,"column":40},"end":{"row":149,"column":41},"action":"insert","lines":["t"],"id":1816}],[{"start":{"row":149,"column":41},"end":{"row":149,"column":42},"action":"insert","lines":["B"],"id":1817}],[{"start":{"row":149,"column":42},"end":{"row":149,"column":43},"action":"insert","lines":["o"],"id":1818}],[{"start":{"row":149,"column":43},"end":{"row":149,"column":44},"action":"insert","lines":["x"],"id":1819}],[{"start":{"row":149,"column":44},"end":{"row":149,"column":45},"action":"insert","lines":[","],"id":1820}],[{"start":{"row":149,"column":45},"end":{"row":149,"column":46},"action":"insert","lines":[" "],"id":1821}],[{"start":{"row":149,"column":46},"end":{"row":149,"column":47},"action":"insert","lines":["i"],"id":1822}],[{"start":{"row":149,"column":47},"end":{"row":149,"column":48},"action":"insert","lines":["t"],"id":1823}],[{"start":{"row":149,"column":48},"end":{"row":149,"column":49},"action":"insert","lines":["e"],"id":1824}],[{"start":{"row":149,"column":49},"end":{"row":149,"column":50},"action":"insert","lines":["m"],"id":1825}],[{"start":{"row":149,"column":50},"end":{"row":149,"column":51},"action":"insert","lines":["B"],"id":1826}],[{"start":{"row":149,"column":51},"end":{"row":149,"column":52},"action":"insert","lines":["u"],"id":1827}],[{"start":{"row":149,"column":52},"end":{"row":149,"column":53},"action":"insert","lines":["f"],"id":1828}],[{"start":{"row":149,"column":53},"end":{"row":149,"column":54},"action":"insert","lines":["f"],"id":1829}],[{"start":{"row":149,"column":54},"end":{"row":149,"column":55},"action":"insert","lines":["e"],"id":1830}],[{"start":{"row":149,"column":55},"end":{"row":149,"column":56},"action":"insert","lines":["r"],"id":1831}],[{"start":{"row":149,"column":56},"end":{"row":149,"column":57},"action":"insert","lines":[","],"id":1832}],[{"start":{"row":149,"column":57},"end":{"row":149,"column":58},"action":"insert","lines":[" "],"id":1833}],[{"start":{"row":149,"column":58},"end":{"row":149,"column":59},"action":"insert","lines":["i"],"id":1834}],[{"start":{"row":149,"column":59},"end":{"row":149,"column":60},"action":"insert","lines":["t"],"id":1835}],[{"start":{"row":149,"column":60},"end":{"row":149,"column":61},"action":"insert","lines":["e"],"id":1836}],[{"start":{"row":149,"column":61},"end":{"row":149,"column":62},"action":"insert","lines":["m"],"id":1837}],[{"start":{"row":149,"column":62},"end":{"row":149,"column":63},"action":"insert","lines":["H"],"id":1838}],[{"start":{"row":149,"column":63},"end":{"row":149,"column":64},"action":"insert","lines":["e"],"id":1839}],[{"start":{"row":149,"column":64},"end":{"row":149,"column":65},"action":"insert","lines":["i"],"id":1840}],[{"start":{"row":149,"column":65},"end":{"row":149,"column":66},"action":"insert","lines":["g"],"id":1841}],[{"start":{"row":149,"column":66},"end":{"row":149,"column":67},"action":"insert","lines":["h"],"id":1842}],[{"start":{"row":149,"column":67},"end":{"row":149,"column":68},"action":"insert","lines":["t"],"id":1843}],[{"start":{"row":149,"column":68},"end":{"row":149,"column":69},"action":"insert","lines":[","],"id":1844}],[{"start":{"row":149,"column":69},"end":{"row":149,"column":70},"action":"insert","lines":[" "],"id":1845}],[{"start":{"row":149,"column":70},"end":{"row":149,"column":71},"action":"insert","lines":["i"],"id":1846}],[{"start":{"row":149,"column":71},"end":{"row":149,"column":72},"action":"insert","lines":["t"],"id":1847}],[{"start":{"row":149,"column":72},"end":{"row":149,"column":73},"action":"insert","lines":["e"],"id":1848}],[{"start":{"row":149,"column":73},"end":{"row":149,"column":74},"action":"insert","lines":["m"],"id":1849}],[{"start":{"row":149,"column":74},"end":{"row":149,"column":75},"action":"insert","lines":["C"],"id":1850}],[{"start":{"row":149,"column":75},"end":{"row":149,"column":76},"action":"insert","lines":["o"],"id":1851}],[{"start":{"row":149,"column":76},"end":{"row":149,"column":77},"action":"insert","lines":["u"],"id":1852}],[{"start":{"row":149,"column":77},"end":{"row":149,"column":78},"action":"insert","lines":["n"],"id":1853}],[{"start":{"row":149,"column":78},"end":{"row":149,"column":79},"action":"insert","lines":["t"],"id":1854}],[{"start":{"row":150,"column":0},"end":{"row":150,"column":1},"action":"insert","lines":[";"],"id":1855}],[{"start":{"row":150,"column":0},"end":{"row":150,"column":1},"action":"remove","lines":[";"],"id":1856}],[{"start":{"row":149,"column":80},"end":{"row":150,"column":4},"action":"remove","lines":[""," "],"id":1857}],[{"start":{"row":149,"column":80},"end":{"row":149,"column":81},"action":"insert","lines":[";"],"id":1858}],[{"start":{"row":149,"column":81},"end":{"row":150,"column":0},"action":"insert","lines":["",""],"id":1859},{"start":{"row":150,"column":0},"end":{"row":150,"column":4},"action":"insert","lines":[" "]}],[{"start":{"row":177,"column":6},"end":{"row":178,"column":0},"action":"insert","lines":["",""],"id":1860},{"start":{"row":178,"column":0},"end":{"row":178,"column":4},"action":"insert","lines":[" "]}],[{"start":{"row":178,"column":4},"end":{"row":179,"column":0},"action":"insert","lines":["",""],"id":1861},{"start":{"row":179,"column":0},"end":{"row":179,"column":4},"action":"insert","lines":[" "]}],[{"start":{"row":179,"column":4},"end":{"row":179,"column":5},"action":"insert","lines":["c"],"id":1862}],[{"start":{"row":179,"column":5},"end":{"row":179,"column":6},"action":"insert","lines":["o"],"id":1863}],[{"start":{"row":179,"column":6},"end":{"row":179,"column":7},"action":"insert","lines":["n"],"id":1864}],[{"start":{"row":179,"column":7},"end":{"row":179,"column":8},"action":"insert","lines":["s"],"id":1865}],[{"start":{"row":179,"column":8},"end":{"row":179,"column":9},"action":"insert","lines":["o"],"id":1866}],[{"start":{"row":179,"column":9},"end":{"row":179,"column":10},"action":"insert","lines":["l"],"id":1867}],[{"start":{"row":179,"column":10},"end":{"row":179,"column":11},"action":"insert","lines":["e"],"id":1868}],[{"start":{"row":179,"column":11},"end":{"row":179,"column":12},"action":"insert","lines":["."],"id":1869}],[{"start":{"row":179,"column":12},"end":{"row":179,"column":13},"action":"insert","lines":["l"],"id":1870}],[{"start":{"row":179,"column":13},"end":{"row":179,"column":14},"action":"insert","lines":["o"],"id":1871}],[{"start":{"row":179,"column":14},"end":{"row":179,"column":15},"action":"insert","lines":["g"],"id":1872}],[{"start":{"row":179,"column":15},"end":{"row":179,"column":17},"action":"insert","lines":["()"],"id":1873}],[{"start":{"row":179,"column":16},"end":{"row":179,"column":18},"action":"insert","lines":["''"],"id":1874}],[{"start":{"row":179,"column":17},"end":{"row":179,"column":18},"action":"insert","lines":["g"],"id":1875}],[{"start":{"row":179,"column":18},"end":{"row":179,"column":19},"action":"insert","lines":["e"],"id":1876}],[{"start":{"row":179,"column":19},"end":{"row":179,"column":20},"action":"insert","lines":["t"],"id":1877}],[{"start":{"row":179,"column":20},"end":{"row":179,"column":21},"action":"insert","lines":["I"],"id":1878}],[{"start":{"row":179,"column":21},"end":{"row":179,"column":22},"action":"insert","lines":["t"],"id":1879}],[{"start":{"row":179,"column":22},"end":{"row":179,"column":23},"action":"insert","lines":["e"],"id":1880}],[{"start":{"row":179,"column":23},"end":{"row":179,"column":24},"action":"insert","lines":["m"],"id":1881}],[{"start":{"row":179,"column":24},"end":{"row":179,"column":25},"action":"insert","lines":["s"],"id":1882}],[{"start":{"row":179,"column":25},"end":{"row":179,"column":26},"action":"insert","lines":["."],"id":1883}],[{"start":{"row":179,"column":26},"end":{"row":179,"column":27},"action":"insert","lines":["r"],"id":1884}],[{"start":{"row":179,"column":27},"end":{"row":179,"column":28},"action":"insert","lines":["e"],"id":1885}],[{"start":{"row":179,"column":28},"end":{"row":179,"column":29},"action":"insert","lines":["s"],"id":1886}],[{"start":{"row":179,"column":29},"end":{"row":179,"column":30},"action":"insert","lines":["u"],"id":1887}],[{"start":{"row":179,"column":30},"end":{"row":179,"column":31},"action":"insert","lines":["l"],"id":1888}],[{"start":{"row":179,"column":31},"end":{"row":179,"column":32},"action":"insert","lines":["t"],"id":1889}],[{"start":{"row":179,"column":33},"end":{"row":179,"column":34},"action":"insert","lines":[","],"id":1890}],[{"start":{"row":179,"column":34},"end":{"row":179,"column":35},"action":"insert","lines":[" "],"id":1891}],[{"start":{"row":179,"column":35},"end":{"row":179,"column":36},"action":"insert","lines":["r"],"id":1892}],[{"start":{"row":179,"column":36},"end":{"row":179,"column":37},"action":"insert","lines":["e"],"id":1893}],[{"start":{"row":179,"column":37},"end":{"row":179,"column":38},"action":"insert","lines":["s"],"id":1894}],[{"start":{"row":179,"column":38},"end":{"row":179,"column":39},"action":"insert","lines":["u"],"id":1895}],[{"start":{"row":179,"column":39},"end":{"row":179,"column":40},"action":"insert","lines":["l"],"id":1896}],[{"start":{"row":179,"column":40},"end":{"row":179,"column":41},"action":"insert","lines":["t"],"id":1897}],[{"start":{"row":179,"column":42},"end":{"row":179,"column":43},"action":"insert","lines":[";"],"id":1898}],[{"start":{"row":149,"column":4},"end":{"row":149,"column":11},"action":"remove","lines":["console"],"id":1899},{"start":{"row":149,"column":4},"end":{"row":149,"column":5},"action":"insert","lines":["j"]}],[{"start":{"row":149,"column":5},"end":{"row":149,"column":6},"action":"insert","lines":["a"],"id":1900}],[{"start":{"row":149,"column":6},"end":{"row":149,"column":7},"action":"insert","lines":["s"],"id":1901}],[{"start":{"row":149,"column":7},"end":{"row":149,"column":8},"action":"insert","lines":["m"],"id":1902}],[{"start":{"row":149,"column":8},"end":{"row":149,"column":9},"action":"insert","lines":["i"],"id":1903}],[{"start":{"row":149,"column":9},"end":{"row":149,"column":10},"action":"insert","lines":["n"],"id":1904}],[{"start":{"row":149,"column":10},"end":{"row":149,"column":11},"action":"insert","lines":["e"],"id":1905}],[{"start":{"row":149,"column":0},"end":{"row":151,"column":0},"action":"remove","lines":[" jasmine.log('getItems', viewBox, listBox, itemBuffer, itemHeight, itemCount);"," ",""],"id":1906}],[{"start":{"row":177,"column":4},"end":{"row":177,"column":5},"action":"insert","lines":["/"],"id":1907}],[{"start":{"row":177,"column":5},"end":{"row":177,"column":6},"action":"insert","lines":["/"],"id":1908}],[{"start":{"row":177,"column":0},"end":{"row":179,"column":0},"action":"remove","lines":[" //console.log('getItems.result', result);"," ",""],"id":1909}]]},"ace":{"folds":[],"scrolltop":2016,"scrollleft":0,"selection":{"start":{"row":165,"column":38},"end":{"row":165,"column":38},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":{"row":143,"state":"start","mode":"ace/mode/jsx"}},"timestamp":1442592580999} | ||
{"filter":false,"title":"VirtualList.jsx","tooltip":"/src/VirtualList.jsx","undoManager":{"mark":12,"position":12,"stack":[[{"start":{"row":165,"column":0},"end":{"row":166,"column":0},"action":"remove","lines":[" //todo add itemBuffer here instead",""],"id":2}],[{"start":{"row":176,"column":0},"end":{"row":178,"column":0},"action":"remove","lines":[" //console.log('getItems.result', result);"," ",""],"id":3}],[{"start":{"row":103,"column":0},"end":{"row":103,"column":8},"action":"remove","lines":[" "],"id":4}],[{"start":{"row":36,"column":12},"end":{"row":36,"column":41},"action":"remove","lines":["viewBox = this.viewBox(props)"],"id":5,"ignore":true},{"start":{"row":36,"column":12},"end":{"row":38,"column":118},"action":"insert","lines":["container = props.container;",""," var viewHeight = typeof container.innerHeight !== 'undefined' ? container.innerHeight : container.clientHeight"]},{"start":{"row":41,"column":16},"end":{"row":41,"column":21},"action":"remove","lines":["Box.h"]},{"start":{"row":41,"column":16},"end":{"row":41,"column":17},"action":"insert","lines":["H"]},{"start":{"row":43,"column":9},"end":{"row":43,"column":51},"action":"remove","lines":["iewBox.top = utils.viewTop(props.container"]},{"start":{"row":43,"column":9},"end":{"row":43,"column":35},"action":"insert","lines":["ar list = this.getDOMNode("]},{"start":{"row":44,"column":0},"end":{"row":45,"column":0},"action":"insert","lines":["",""]},{"start":{"row":45,"column":9},"end":{"row":47,"column":40},"action":"remove","lines":["iewBox.bottom = viewBox.top + viewBox.height;"," "," var listBox = this.listBox(props"]},{"start":{"row":45,"column":9},"end":{"row":47,"column":45},"action":"insert","lines":["ar offsetTop = utils.topDifference(list, container);",""," var viewTop = utils.viewTop(container"]},{"start":{"row":49,"column":51},"end":{"row":49,"column":63},"action":"remove","lines":["Box, listBox"]},{"start":{"row":49,"column":51},"end":{"row":49,"column":77},"action":"insert","lines":["Top, viewHeight, offsetTop"]},{"start":{"row":71,"column":4},"end":{"row":98,"column":0},"action":"remove","lines":["viewBox: function viweBox(nextProps) {"," return (this.view = this.view || this._getViewBox);"," },"," _getViewBox: function _getViewBox(nextProps) {"," return {"," height: typeof nextProps.container.innerHeight !== 'undefined' ? nextProps.container.innerHeight : nextProps.container.clientHeight"," };"," },"," _getListBox: function(nextProps) {"," var list = this.getDOMNode();",""," var top = utils.topDifference(list, nextProps.container);"," "," var height = nextProps.itemHeight * nextProps.items.length;"," "," return {"," top: top,"," height: height,"," bottom: top + height"," };"," },"," listBox: function listBox(nextProps) {"," return (this.list = this.list || this._getListBox(nextProps));"," },"," componentWillReceiveProps: function(nextProps) {"," // clear caches"," this.view = this.list = null;",""]},{"start":{"row":71,"column":4},"end":{"row":71,"column":52},"action":"insert","lines":["componentWillReceiveProps: function(nextProps) {"]},{"start":{"row":77,"column":0},"end":{"row":77,"column":8},"action":"remove","lines":[" "]},{"start":{"row":79,"column":0},"end":{"row":79,"column":8},"action":"insert","lines":[" "]},{"start":{"row":94,"column":0},"end":{"row":96,"column":0},"action":"remove","lines":[" "," this.view = this.list = null;",""]},{"start":{"row":113,"column":29},"end":{"row":113,"column":36},"action":"remove","lines":[" getBox"]},{"start":{"row":122,"column":36},"end":{"row":122,"column":60},"action":"remove","lines":["Box, listBox, itemBuffer"]},{"start":{"row":122,"column":36},"end":{"row":122,"column":60},"action":"insert","lines":["Top, viewHeight, listTop"]},{"start":{"row":122,"column":83},"end":{"row":122,"column":95},"action":"insert","lines":[", itemBuffer"]},{"start":{"row":127,"column":0},"end":{"row":144,"column":0},"action":"insert","lines":[" var listHeight = itemHeight * itemCount;"," "," var listBox = {"," top: listTop,"," height: listHeight,"," bottom: listTop + listHeight"," };"," "," var bufferHeight = itemBuffer * itemHeight;"," viewTop -= bufferHeight;"," viewHeight += bufferHeight * 2;"," "," var viewBox = {"," top: viewTop,"," bottom: viewTop + viewHeight"," };"," ",""]},{"start":{"row":156,"column":78},"end":{"row":156,"column":91},"action":"remove","lines":[" - itemBuffer"]},{"start":{"row":157,"column":23},"end":{"row":157,"column":43},"action":"remove","lines":[" Math.min(itemCount,"]},{"start":{"row":157,"column":66},"end":{"row":157,"column":80},"action":"remove","lines":[" + itemBuffer)"]}],[{"start":{"row":43,"column":19},"end":{"row":43,"column":27},"action":"remove","lines":["this.get"],"id":6,"ignore":true},{"start":{"row":43,"column":19},"end":{"row":43,"column":29},"action":"insert","lines":["React.find"]},{"start":{"row":43,"column":37},"end":{"row":43,"column":41},"action":"insert","lines":["this"]}],[{"start":{"row":36,"column":12},"end":{"row":38,"column":118},"action":"remove","lines":["container = props.container;",""," var viewHeight = typeof container.innerHeight !== 'undefined' ? container.innerHeight : container.clientHeight"],"id":7,"ignore":true},{"start":{"row":36,"column":12},"end":{"row":36,"column":41},"action":"insert","lines":["viewBox = this.viewBox(props)"]},{"start":{"row":39,"column":16},"end":{"row":39,"column":17},"action":"remove","lines":["H"]},{"start":{"row":39,"column":16},"end":{"row":39,"column":21},"action":"insert","lines":["Box.h"]},{"start":{"row":41,"column":9},"end":{"row":41,"column":41},"action":"remove","lines":["ar list = React.findDOMNode(this"]},{"start":{"row":41,"column":9},"end":{"row":41,"column":51},"action":"insert","lines":["iewBox.top = utils.viewTop(props.container"]},{"start":{"row":42,"column":0},"end":{"row":43,"column":0},"action":"remove","lines":["",""]},{"start":{"row":42,"column":9},"end":{"row":44,"column":45},"action":"remove","lines":["ar offsetTop = utils.topDifference(list, container);",""," var viewTop = utils.viewTop(container"]},{"start":{"row":42,"column":9},"end":{"row":44,"column":40},"action":"insert","lines":["iewBox.bottom = viewBox.top + viewBox.height;"," "," var listBox = this.listBox(props"]},{"start":{"row":46,"column":51},"end":{"row":46,"column":77},"action":"remove","lines":["Top, viewHeight, offsetTop"]},{"start":{"row":46,"column":51},"end":{"row":46,"column":63},"action":"insert","lines":["Box, listBox"]},{"start":{"row":68,"column":4},"end":{"row":68,"column":52},"action":"remove","lines":["componentWillReceiveProps: function(nextProps) {"]},{"start":{"row":68,"column":4},"end":{"row":95,"column":0},"action":"insert","lines":["viewBox: function viweBox(nextProps) {"," return (this.view = this.view || this._getViewBox);"," },"," _getViewBox: function _getViewBox(nextProps) {"," return {"," height: typeof nextProps.container.innerHeight !== 'undefined' ? nextProps.container.innerHeight : nextProps.container.clientHeight"," };"," },"," _getListBox: function(nextProps) {"," var list = this.getDOMNode();",""," var top = utils.topDifference(list, nextProps.container);"," "," var height = nextProps.itemHeight * nextProps.items.length;"," "," return {"," top: top,"," height: height,"," bottom: top + height"," };"," },"," listBox: function listBox(nextProps) {"," return (this.list = this.list || this._getListBox(nextProps));"," },"," componentWillReceiveProps: function(nextProps) {"," // clear caches"," this.view = this.list = null;",""]},{"start":{"row":101,"column":0},"end":{"row":101,"column":8},"action":"insert","lines":[" "]},{"start":{"row":103,"column":0},"end":{"row":103,"column":8},"action":"remove","lines":[" "]},{"start":{"row":118,"column":0},"end":{"row":120,"column":0},"action":"insert","lines":[" "," this.view = this.list = null;",""]},{"start":{"row":139,"column":29},"end":{"row":139,"column":36},"action":"insert","lines":[" getBox"]},{"start":{"row":148,"column":36},"end":{"row":148,"column":60},"action":"remove","lines":["Top, viewHeight, listTop"]},{"start":{"row":148,"column":36},"end":{"row":148,"column":60},"action":"insert","lines":["Box, listBox, itemBuffer"]},{"start":{"row":148,"column":83},"end":{"row":148,"column":95},"action":"remove","lines":[", itemBuffer"]},{"start":{"row":153,"column":0},"end":{"row":170,"column":0},"action":"remove","lines":[" var listHeight = itemHeight * itemCount;"," "," var listBox = {"," top: listTop,"," height: listHeight,"," bottom: listTop + listHeight"," };"," "," var bufferHeight = itemBuffer * itemHeight;"," viewTop -= bufferHeight;"," viewHeight += bufferHeight * 2;"," "," var viewBox = {"," top: viewTop,"," bottom: viewTop + viewHeight"," };"," ",""]},{"start":{"row":165,"column":78},"end":{"row":165,"column":91},"action":"insert","lines":[" - itemBuffer"]},{"start":{"row":166,"column":23},"end":{"row":166,"column":43},"action":"insert","lines":[" Math.min(itemCount,"]},{"start":{"row":166,"column":86},"end":{"row":166,"column":100},"action":"insert","lines":[" + itemBuffer)"]}],[{"start":{"row":41,"column":0},"end":{"row":42,"column":0},"action":"insert","lines":["<<<<<<< HEAD",""],"id":8,"ignore":true},{"start":{"row":45,"column":42},"end":{"row":52,"column":14},"action":"insert","lines":["","======="," var list = React.findDOMNode(this);",""," var offsetTop = utils.topDifference(list, container);",""," var viewTop = utils.viewTop(container);",">>>>>>> master"]}],[{"start":{"row":41,"column":0},"end":{"row":42,"column":0},"action":"remove","lines":["<<<<<<< HEAD",""],"id":9}],[{"start":{"row":45,"column":0},"end":{"row":52,"column":0},"action":"remove","lines":["======="," var list = React.findDOMNode(this);",""," var offsetTop = utils.topDifference(list, container);",""," var viewTop = utils.viewTop(container);",">>>>>>> master",""],"id":10}],[{"start":{"row":45,"column":0},"end":{"row":45,"column":1},"action":"insert","lines":["s"],"id":11}],[{"start":{"row":45,"column":0},"end":{"row":45,"column":1},"action":"remove","lines":["s"],"id":12}],[{"start":{"row":36,"column":12},"end":{"row":36,"column":41},"action":"remove","lines":["viewBox = this.viewBox(props)"],"id":13,"ignore":true},{"start":{"row":36,"column":12},"end":{"row":38,"column":118},"action":"insert","lines":["container = props.container;",""," var viewHeight = typeof container.innerHeight !== 'undefined' ? container.innerHeight : container.clientHeight"]},{"start":{"row":41,"column":16},"end":{"row":41,"column":21},"action":"remove","lines":["Box.h"]},{"start":{"row":41,"column":16},"end":{"row":41,"column":17},"action":"insert","lines":["H"]},{"start":{"row":43,"column":9},"end":{"row":43,"column":51},"action":"remove","lines":["iewBox.top = utils.viewTop(props.container"]},{"start":{"row":43,"column":9},"end":{"row":43,"column":41},"action":"insert","lines":["ar list = React.findDOMNode(this"]},{"start":{"row":44,"column":0},"end":{"row":45,"column":0},"action":"insert","lines":["",""]},{"start":{"row":45,"column":9},"end":{"row":47,"column":40},"action":"remove","lines":["iewBox.bottom = viewBox.top + viewBox.height;"," "," var listBox = this.listBox(props"]},{"start":{"row":45,"column":9},"end":{"row":47,"column":45},"action":"insert","lines":["ar offsetTop = utils.topDifference(list, container);",""," var viewTop = utils.viewTop(container"]},{"start":{"row":49,"column":51},"end":{"row":49,"column":63},"action":"remove","lines":["Box, listBox"]},{"start":{"row":49,"column":51},"end":{"row":49,"column":77},"action":"insert","lines":["Top, viewHeight, offsetTop"]},{"start":{"row":71,"column":4},"end":{"row":98,"column":0},"action":"remove","lines":["viewBox: function viweBox(nextProps) {"," return (this.view = this.view || this._getViewBox);"," },"," _getViewBox: function _getViewBox(nextProps) {"," return {"," height: typeof nextProps.container.innerHeight !== 'undefined' ? nextProps.container.innerHeight : nextProps.container.clientHeight"," };"," },"," _getListBox: function(nextProps) {"," var list = this.getDOMNode();",""," var top = utils.topDifference(list, nextProps.container);"," "," var height = nextProps.itemHeight * nextProps.items.length;"," "," return {"," top: top,"," height: height,"," bottom: top + height"," };"," },"," listBox: function listBox(nextProps) {"," return (this.list = this.list || this._getListBox(nextProps));"," },"," componentWillReceiveProps: function(nextProps) {"," // clear caches"," this.view = this.list = null;",""]},{"start":{"row":71,"column":4},"end":{"row":71,"column":52},"action":"insert","lines":["componentWillReceiveProps: function(nextProps) {"]},{"start":{"row":77,"column":0},"end":{"row":77,"column":8},"action":"remove","lines":[" "]},{"start":{"row":79,"column":0},"end":{"row":79,"column":8},"action":"insert","lines":[" "]},{"start":{"row":94,"column":0},"end":{"row":96,"column":0},"action":"remove","lines":[" "," this.view = this.list = null;",""]},{"start":{"row":113,"column":29},"end":{"row":113,"column":36},"action":"remove","lines":[" getBox"]},{"start":{"row":122,"column":36},"end":{"row":122,"column":60},"action":"remove","lines":["Box, listBox, itemBuffer"]},{"start":{"row":122,"column":36},"end":{"row":122,"column":60},"action":"insert","lines":["Top, viewHeight, listTop"]},{"start":{"row":122,"column":83},"end":{"row":122,"column":95},"action":"insert","lines":[", itemBuffer"]},{"start":{"row":127,"column":0},"end":{"row":144,"column":0},"action":"insert","lines":[" var listHeight = itemHeight * itemCount;"," "," var listBox = {"," top: listTop,"," height: listHeight,"," bottom: listTop + listHeight"," };"," "," var bufferHeight = itemBuffer * itemHeight;"," viewTop -= bufferHeight;"," viewHeight += bufferHeight * 2;"," "," var viewBox = {"," top: viewTop,"," bottom: viewTop + viewHeight"," };"," ",""]},{"start":{"row":156,"column":78},"end":{"row":156,"column":91},"action":"remove","lines":[" - itemBuffer"]},{"start":{"row":157,"column":23},"end":{"row":157,"column":43},"action":"remove","lines":[" Math.min(itemCount,"]},{"start":{"row":157,"column":66},"end":{"row":157,"column":80},"action":"remove","lines":[" + itemBuffer)"]}],[{"start":{"row":36,"column":12},"end":{"row":38,"column":118},"action":"remove","lines":["container = props.container;",""," var viewHeight = typeof container.innerHeight !== 'undefined' ? container.innerHeight : container.clientHeight"],"id":14,"ignore":true},{"start":{"row":36,"column":12},"end":{"row":36,"column":41},"action":"insert","lines":["viewBox = this.viewBox(props)"]},{"start":{"row":39,"column":16},"end":{"row":39,"column":17},"action":"remove","lines":["H"]},{"start":{"row":39,"column":16},"end":{"row":39,"column":21},"action":"insert","lines":["Box.h"]},{"start":{"row":41,"column":9},"end":{"row":41,"column":41},"action":"remove","lines":["ar list = React.findDOMNode(this"]},{"start":{"row":41,"column":9},"end":{"row":41,"column":51},"action":"insert","lines":["iewBox.top = utils.viewTop(props.container"]},{"start":{"row":42,"column":0},"end":{"row":43,"column":0},"action":"remove","lines":["",""]},{"start":{"row":42,"column":9},"end":{"row":44,"column":45},"action":"remove","lines":["ar offsetTop = utils.topDifference(list, container);",""," var viewTop = utils.viewTop(container"]},{"start":{"row":42,"column":9},"end":{"row":44,"column":40},"action":"insert","lines":["iewBox.bottom = viewBox.top + viewBox.height;"," "," var listBox = this.listBox(props"]},{"start":{"row":46,"column":51},"end":{"row":46,"column":77},"action":"remove","lines":["Top, viewHeight, offsetTop"]},{"start":{"row":46,"column":51},"end":{"row":46,"column":63},"action":"insert","lines":["Box, listBox"]},{"start":{"row":68,"column":4},"end":{"row":68,"column":52},"action":"remove","lines":["componentWillReceiveProps: function(nextProps) {"]},{"start":{"row":68,"column":4},"end":{"row":95,"column":0},"action":"insert","lines":["viewBox: function viweBox(nextProps) {"," return (this.view = this.view || this._getViewBox);"," },"," _getViewBox: function _getViewBox(nextProps) {"," return {"," height: typeof nextProps.container.innerHeight !== 'undefined' ? nextProps.container.innerHeight : nextProps.container.clientHeight"," };"," },"," _getListBox: function(nextProps) {"," var list = this.getDOMNode();",""," var top = utils.topDifference(list, nextProps.container);"," "," var height = nextProps.itemHeight * nextProps.items.length;"," "," return {"," top: top,"," height: height,"," bottom: top + height"," };"," },"," listBox: function listBox(nextProps) {"," return (this.list = this.list || this._getListBox(nextProps));"," },"," componentWillReceiveProps: function(nextProps) {"," // clear caches"," this.view = this.list = null;",""]},{"start":{"row":101,"column":0},"end":{"row":101,"column":8},"action":"insert","lines":[" "]},{"start":{"row":103,"column":0},"end":{"row":103,"column":8},"action":"remove","lines":[" "]},{"start":{"row":118,"column":0},"end":{"row":120,"column":0},"action":"insert","lines":[" "," this.view = this.list = null;",""]},{"start":{"row":139,"column":29},"end":{"row":139,"column":36},"action":"insert","lines":[" getBox"]},{"start":{"row":148,"column":36},"end":{"row":148,"column":60},"action":"remove","lines":["Top, viewHeight, listTop"]},{"start":{"row":148,"column":36},"end":{"row":148,"column":60},"action":"insert","lines":["Box, listBox, itemBuffer"]},{"start":{"row":148,"column":83},"end":{"row":148,"column":95},"action":"remove","lines":[", itemBuffer"]},{"start":{"row":153,"column":0},"end":{"row":170,"column":0},"action":"remove","lines":[" var listHeight = itemHeight * itemCount;"," "," var listBox = {"," top: listTop,"," height: listHeight,"," bottom: listTop + listHeight"," };"," "," var bufferHeight = itemBuffer * itemHeight;"," viewTop -= bufferHeight;"," viewHeight += bufferHeight * 2;"," "," var viewBox = {"," top: viewTop,"," bottom: viewTop + viewHeight"," };"," ",""]},{"start":{"row":165,"column":78},"end":{"row":165,"column":91},"action":"insert","lines":[" - itemBuffer"]},{"start":{"row":166,"column":23},"end":{"row":166,"column":43},"action":"insert","lines":[" Math.min(itemCount,"]},{"start":{"row":166,"column":86},"end":{"row":166,"column":100},"action":"insert","lines":[" + itemBuffer)"]}]]},"ace":{"folds":[],"scrolltop":518,"scrollleft":0,"selection":{"start":{"row":55,"column":6},"end":{"row":55,"column":6},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":{"row":36,"state":"start","mode":"ace/mode/javascript"}},"timestamp":1446603667398,"hash":"b1241d5b520d51488da28839e2c6731aae923ca8"} |
@@ -1,1 +0,1 @@ | ||
{"filter":false,"title":"utils.js","tooltip":"/test/utils.js","undoManager":{"mark":-1,"position":-1,"stack":[]},"ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":0,"column":0},"end":{"row":0,"column":0},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"timestamp":1442591709086,"hash":"a5d5e9655a25681420ff5fcc1e83ce2214412703"} | ||
{"filter":false,"title":"utils.js","tooltip":"/test/utils.js","ace":{"folds":[],"scrolltop":0,"scrollleft":0,"selection":{"start":{"row":0,"column":0},"end":{"row":0,"column":0},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":0},"hash":"a5d5e9655a25681420ff5fcc1e83ce2214412703","undoManager":{"mark":-1,"position":-1,"stack":[]},"timestamp":1442773622000} |
@@ -1,1 +0,1 @@ | ||
{"filter":false,"title":"VirtualList.getBox.js","tooltip":"/test/VirtualList.getBox.js","ace":{"folds":[],"scrolltop":300,"scrollleft":0,"selection":{"start":{"row":42,"column":0},"end":{"row":42,"column":0},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":{"row":29,"state":"no_regex","mode":"ace/mode/javascript"}},"hash":"b991d8bfffbe29fc74c39c7a37fe9f68cbaf260e","undoManager":{"mark":-1,"position":-1,"stack":[]},"timestamp":1440267108000} | ||
{"filter":false,"title":"VirtualList.getBox.js","tooltip":"/test/VirtualList.getBox.js","undoManager":{"mark":-1,"position":-1,"stack":[]},"ace":{"folds":[],"scrolltop":300,"scrollleft":0,"selection":{"start":{"row":42,"column":0},"end":{"row":42,"column":0},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":{"row":67,"state":"start","mode":"ace/mode/javascript"}},"timestamp":1442773622000,"hash":"b991d8bfffbe29fc74c39c7a37fe9f68cbaf260e"} |
@@ -1,1 +0,1 @@ | ||
{"filter":false,"title":"VirtualList.getItems.js","tooltip":"/test/VirtualList.getItems.js","undoManager":{"mark":100,"position":100,"stack":[[{"start":{"row":325,"column":30},"end":{"row":325,"column":31},"action":"insert","lines":["a"],"id":580}],[{"start":{"row":325,"column":31},"end":{"row":325,"column":32},"action":"insert","lines":["n"],"id":581}],[{"start":{"row":325,"column":32},"end":{"row":325,"column":33},"action":"insert","lines":["d"],"id":582}],[{"start":{"row":325,"column":33},"end":{"row":325,"column":34},"action":"insert","lines":["o"],"id":583}],[{"start":{"row":325,"column":34},"end":{"row":325,"column":35},"action":"insert","lines":["m"],"id":584}],[{"start":{"row":325,"column":35},"end":{"row":325,"column":37},"action":"insert","lines":["()"],"id":585}],[{"start":{"row":325,"column":36},"end":{"row":325,"column":37},"action":"insert","lines":["0"],"id":586}],[{"start":{"row":325,"column":37},"end":{"row":325,"column":38},"action":"insert","lines":[","],"id":587}],[{"start":{"row":325,"column":38},"end":{"row":325,"column":39},"action":"insert","lines":[" "],"id":588}],[{"start":{"row":325,"column":39},"end":{"row":325,"column":40},"action":"insert","lines":["4"],"id":589}],[{"start":{"row":325,"column":40},"end":{"row":325,"column":41},"action":"insert","lines":["0"],"id":590}],[{"start":{"row":325,"column":40},"end":{"row":325,"column":41},"action":"remove","lines":["0"],"id":591}],[{"start":{"row":325,"column":39},"end":{"row":325,"column":40},"action":"remove","lines":["4"],"id":592}],[{"start":{"row":325,"column":39},"end":{"row":325,"column":40},"action":"insert","lines":["5"],"id":593}],[{"start":{"row":325,"column":40},"end":{"row":325,"column":41},"action":"insert","lines":["0"],"id":594}],[{"start":{"row":325,"column":41},"end":{"row":325,"column":42},"action":"insert","lines":["0"],"id":595}],[{"start":{"row":325,"column":43},"end":{"row":325,"column":44},"action":"insert","lines":[";"],"id":596}],[{"start":{"row":325,"column":44},"end":{"row":326,"column":0},"action":"insert","lines":["",""],"id":597},{"start":{"row":326,"column":0},"end":{"row":326,"column":12},"action":"insert","lines":[" "]}],[{"start":{"row":326,"column":12},"end":{"row":326,"column":13},"action":"insert","lines":["v"],"id":598}],[{"start":{"row":326,"column":13},"end":{"row":326,"column":14},"action":"insert","lines":["a"],"id":599}],[{"start":{"row":326,"column":14},"end":{"row":326,"column":15},"action":"insert","lines":["r"],"id":600}],[{"start":{"row":326,"column":15},"end":{"row":326,"column":16},"action":"insert","lines":[" "],"id":601}],[{"start":{"row":326,"column":16},"end":{"row":326,"column":17},"action":"insert","lines":["i"],"id":602}],[{"start":{"row":326,"column":17},"end":{"row":326,"column":18},"action":"insert","lines":["t"],"id":603}],[{"start":{"row":326,"column":18},"end":{"row":326,"column":19},"action":"insert","lines":["e"],"id":604}],[{"start":{"row":326,"column":19},"end":{"row":326,"column":20},"action":"insert","lines":["m"],"id":605}],[{"start":{"row":326,"column":20},"end":{"row":326,"column":21},"action":"insert","lines":["C"],"id":606}],[{"start":{"row":326,"column":21},"end":{"row":326,"column":22},"action":"insert","lines":["o"],"id":607}],[{"start":{"row":326,"column":22},"end":{"row":326,"column":23},"action":"insert","lines":["u"],"id":608}],[{"start":{"row":326,"column":23},"end":{"row":326,"column":24},"action":"insert","lines":["n"],"id":609}],[{"start":{"row":326,"column":24},"end":{"row":326,"column":25},"action":"insert","lines":["t"],"id":610}],[{"start":{"row":326,"column":25},"end":{"row":326,"column":26},"action":"insert","lines":[" "],"id":611}],[{"start":{"row":326,"column":26},"end":{"row":326,"column":27},"action":"insert","lines":["="],"id":612}],[{"start":{"row":326,"column":27},"end":{"row":326,"column":28},"action":"insert","lines":[" "],"id":613}],[{"start":{"row":326,"column":28},"end":{"row":326,"column":29},"action":"insert","lines":["r"],"id":614}],[{"start":{"row":326,"column":29},"end":{"row":326,"column":30},"action":"insert","lines":["a"],"id":615}],[{"start":{"row":326,"column":30},"end":{"row":326,"column":31},"action":"insert","lines":["n"],"id":616}],[{"start":{"row":326,"column":31},"end":{"row":326,"column":32},"action":"insert","lines":["d"],"id":617}],[{"start":{"row":326,"column":32},"end":{"row":326,"column":33},"action":"insert","lines":["o"],"id":618}],[{"start":{"row":326,"column":33},"end":{"row":326,"column":34},"action":"insert","lines":["m"],"id":619}],[{"start":{"row":326,"column":34},"end":{"row":326,"column":36},"action":"insert","lines":["()"],"id":620}],[{"start":{"row":326,"column":35},"end":{"row":326,"column":36},"action":"insert","lines":["5"],"id":621}],[{"start":{"row":326,"column":36},"end":{"row":326,"column":37},"action":"insert","lines":["0"],"id":622}],[{"start":{"row":326,"column":37},"end":{"row":326,"column":38},"action":"insert","lines":["0"],"id":623}],[{"start":{"row":326,"column":38},"end":{"row":326,"column":39},"action":"insert","lines":[","],"id":624}],[{"start":{"row":326,"column":39},"end":{"row":326,"column":40},"action":"insert","lines":[" "],"id":625}],[{"start":{"row":326,"column":40},"end":{"row":326,"column":41},"action":"insert","lines":["1"],"id":626}],[{"start":{"row":326,"column":41},"end":{"row":326,"column":42},"action":"insert","lines":["0"],"id":627}],[{"start":{"row":326,"column":42},"end":{"row":326,"column":43},"action":"insert","lines":["0"],"id":628}],[{"start":{"row":326,"column":43},"end":{"row":326,"column":44},"action":"insert","lines":["0"],"id":629}],[{"start":{"row":326,"column":45},"end":{"row":326,"column":46},"action":"insert","lines":[";"],"id":630}],[{"start":{"row":326,"column":46},"end":{"row":327,"column":0},"action":"insert","lines":["",""],"id":631},{"start":{"row":327,"column":0},"end":{"row":327,"column":12},"action":"insert","lines":[" "]}],[{"start":{"row":327,"column":12},"end":{"row":327,"column":13},"action":"insert","lines":["v"],"id":632}],[{"start":{"row":327,"column":13},"end":{"row":327,"column":14},"action":"insert","lines":["a"],"id":633}],[{"start":{"row":327,"column":14},"end":{"row":327,"column":15},"action":"insert","lines":["r"],"id":634}],[{"start":{"row":327,"column":15},"end":{"row":327,"column":16},"action":"insert","lines":[" "],"id":635}],[{"start":{"row":327,"column":16},"end":{"row":327,"column":17},"action":"insert","lines":["i"],"id":636}],[{"start":{"row":327,"column":17},"end":{"row":327,"column":18},"action":"insert","lines":["t"],"id":637}],[{"start":{"row":327,"column":18},"end":{"row":327,"column":19},"action":"insert","lines":["e"],"id":638}],[{"start":{"row":327,"column":19},"end":{"row":327,"column":20},"action":"insert","lines":["m"],"id":639}],[{"start":{"row":327,"column":20},"end":{"row":327,"column":21},"action":"insert","lines":["B"],"id":640}],[{"start":{"row":327,"column":21},"end":{"row":327,"column":22},"action":"insert","lines":["u"],"id":641}],[{"start":{"row":327,"column":22},"end":{"row":327,"column":23},"action":"insert","lines":["f"],"id":642}],[{"start":{"row":327,"column":23},"end":{"row":327,"column":24},"action":"insert","lines":["f"],"id":643}],[{"start":{"row":327,"column":24},"end":{"row":327,"column":25},"action":"insert","lines":["e"],"id":644}],[{"start":{"row":327,"column":25},"end":{"row":327,"column":26},"action":"insert","lines":["r"],"id":645}],[{"start":{"row":327,"column":26},"end":{"row":327,"column":27},"action":"insert","lines":[" "],"id":646}],[{"start":{"row":327,"column":27},"end":{"row":327,"column":28},"action":"insert","lines":["="],"id":647}],[{"start":{"row":327,"column":28},"end":{"row":327,"column":29},"action":"insert","lines":[" "],"id":648}],[{"start":{"row":327,"column":29},"end":{"row":327,"column":30},"action":"insert","lines":["r"],"id":649}],[{"start":{"row":327,"column":30},"end":{"row":327,"column":31},"action":"insert","lines":["a"],"id":650}],[{"start":{"row":327,"column":31},"end":{"row":327,"column":32},"action":"insert","lines":["n"],"id":651}],[{"start":{"row":327,"column":32},"end":{"row":327,"column":33},"action":"insert","lines":["d"],"id":652}],[{"start":{"row":327,"column":33},"end":{"row":327,"column":34},"action":"insert","lines":["o"],"id":653}],[{"start":{"row":327,"column":34},"end":{"row":327,"column":35},"action":"insert","lines":["m"],"id":654}],[{"start":{"row":327,"column":35},"end":{"row":327,"column":37},"action":"insert","lines":["()"],"id":655}],[{"start":{"row":327,"column":36},"end":{"row":327,"column":37},"action":"insert","lines":["0"],"id":656}],[{"start":{"row":327,"column":37},"end":{"row":327,"column":38},"action":"insert","lines":[","],"id":657}],[{"start":{"row":327,"column":38},"end":{"row":327,"column":39},"action":"insert","lines":[" "],"id":658}],[{"start":{"row":327,"column":39},"end":{"row":327,"column":40},"action":"insert","lines":["1"],"id":659}],[{"start":{"row":327,"column":40},"end":{"row":327,"column":41},"action":"insert","lines":["0"],"id":660}],[{"start":{"row":327,"column":41},"end":{"row":327,"column":42},"action":"insert","lines":["0"],"id":661}],[{"start":{"row":327,"column":43},"end":{"row":327,"column":44},"action":"insert","lines":[";"],"id":662}],[{"start":{"row":315,"column":0},"end":{"row":316,"column":0},"action":"remove","lines":[" //var result = new VirtualList.getItems(1000, viewHeight, 0, itemHeight, itemCount, 5);",""],"id":663}],[{"start":{"row":348,"column":0},"end":{"row":349,"column":0},"action":"insert","lines":[" var result = new VirtualList.getItems(viewBox, listBox, 5, itemHeight, itemCount);",""],"id":664}],[{"start":{"row":348,"column":0},"end":{"row":348,"column":4},"action":"insert","lines":[" "],"id":665}],[{"start":{"row":347,"column":12},"end":{"row":347,"column":13},"action":"insert","lines":["/"],"id":666}],[{"start":{"row":347,"column":13},"end":{"row":347,"column":14},"action":"insert","lines":["/"],"id":667}],[{"start":{"row":348,"column":68},"end":{"row":348,"column":69},"action":"remove","lines":["5"],"id":668}],[{"start":{"row":348,"column":68},"end":{"row":348,"column":69},"action":"insert","lines":["i"],"id":669}],[{"start":{"row":348,"column":69},"end":{"row":348,"column":70},"action":"insert","lines":["t"],"id":670}],[{"start":{"row":348,"column":70},"end":{"row":348,"column":71},"action":"insert","lines":["e"],"id":671}],[{"start":{"row":348,"column":71},"end":{"row":348,"column":72},"action":"insert","lines":["m"],"id":672}],[{"start":{"row":348,"column":72},"end":{"row":348,"column":73},"action":"insert","lines":["B"],"id":673}],[{"start":{"row":348,"column":73},"end":{"row":348,"column":74},"action":"insert","lines":["u"],"id":674}],[{"start":{"row":348,"column":74},"end":{"row":348,"column":75},"action":"insert","lines":["f"],"id":675}],[{"start":{"row":348,"column":75},"end":{"row":348,"column":76},"action":"insert","lines":["f"],"id":676}],[{"start":{"row":348,"column":76},"end":{"row":348,"column":77},"action":"insert","lines":["e"],"id":677}],[{"start":{"row":348,"column":77},"end":{"row":348,"column":78},"action":"insert","lines":["r"],"id":678}],[{"start":{"row":354,"column":0},"end":{"row":356,"column":0},"action":"remove","lines":[" // console.log('new VirtualRenderer().getItems ran %d iterations in %d ms', count, end - start);"," ",""],"id":679}],[{"start":{"row":346,"column":0},"end":{"row":348,"column":0},"action":"remove","lines":[" "," //var result = new VirtualList.getItems(, , , random(0, 500), random(500, 1000), random(0, 100));",""],"id":680}]]},"ace":{"folds":[],"scrolltop":60,"scrollleft":0,"selection":{"start":{"row":11,"column":4},"end":{"row":11,"column":4},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":{"row":3,"state":"start","mode":"ace/mode/javascript"}},"timestamp":1442593331069,"hash":"0a9924054688cc7216575ff1a806a7df860c7b1a"} | ||
{"filter":false,"title":"VirtualList.getItems.js","tooltip":"/test/VirtualList.getItems.js","undoManager":{"mark":100,"position":100,"stack":[[{"start":{"row":353,"column":33},"end":{"row":353,"column":34},"action":"insert","lines":["t"],"id":128}],[{"start":{"row":353,"column":34},"end":{"row":353,"column":35},"action":"insert","lines":["i"],"id":129}],[{"start":{"row":353,"column":35},"end":{"row":353,"column":36},"action":"insert","lines":["o"],"id":130}],[{"start":{"row":353,"column":36},"end":{"row":353,"column":37},"action":"insert","lines":["n"],"id":131}],[{"start":{"row":353,"column":37},"end":{"row":353,"column":38},"action":"insert","lines":[";"],"id":132}],[{"start":{"row":356,"column":0},"end":{"row":357,"column":0},"action":"remove","lines":[" var end = Date.now();",""],"id":133}],[{"start":{"row":356,"column":12},"end":{"row":356,"column":13},"action":"insert","lines":["a"],"id":134}],[{"start":{"row":356,"column":13},"end":{"row":356,"column":14},"action":"insert","lines":["v"],"id":135}],[{"start":{"row":356,"column":14},"end":{"row":356,"column":15},"action":"insert","lines":["e"],"id":136}],[{"start":{"row":356,"column":15},"end":{"row":356,"column":16},"action":"insert","lines":["r"],"id":137}],[{"start":{"row":356,"column":16},"end":{"row":356,"column":17},"action":"insert","lines":["a"],"id":138}],[{"start":{"row":356,"column":17},"end":{"row":356,"column":18},"action":"insert","lines":["g"],"id":139}],[{"start":{"row":356,"column":18},"end":{"row":356,"column":19},"action":"insert","lines":["e"],"id":140}],[{"start":{"row":356,"column":19},"end":{"row":356,"column":20},"action":"remove","lines":["d"],"id":141}],[{"start":{"row":356,"column":19},"end":{"row":356,"column":20},"action":"insert","lines":["D"],"id":142}],[{"start":{"row":358,"column":15},"end":{"row":358,"column":23},"action":"remove","lines":["duration"],"id":143},{"start":{"row":358,"column":15},"end":{"row":358,"column":30},"action":"insert","lines":["averageDuration"]}],[{"start":{"row":358,"column":46},"end":{"row":358,"column":49},"action":"remove","lines":["000"],"id":144}],[{"start":{"row":356,"column":30},"end":{"row":356,"column":41},"action":"remove","lines":["end - start"],"id":145},{"start":{"row":356,"column":30},"end":{"row":356,"column":31},"action":"insert","lines":["t"]}],[{"start":{"row":356,"column":31},"end":{"row":356,"column":32},"action":"insert","lines":["o"],"id":146}],[{"start":{"row":356,"column":32},"end":{"row":356,"column":33},"action":"insert","lines":["t"],"id":147}],[{"start":{"row":356,"column":33},"end":{"row":356,"column":34},"action":"insert","lines":["a"],"id":148}],[{"start":{"row":356,"column":34},"end":{"row":356,"column":35},"action":"insert","lines":["l"],"id":149}],[{"start":{"row":356,"column":35},"end":{"row":356,"column":36},"action":"insert","lines":["D"],"id":150}],[{"start":{"row":356,"column":36},"end":{"row":356,"column":37},"action":"insert","lines":["u"],"id":151}],[{"start":{"row":356,"column":37},"end":{"row":356,"column":38},"action":"insert","lines":["r"],"id":152}],[{"start":{"row":356,"column":38},"end":{"row":356,"column":39},"action":"insert","lines":["a"],"id":153}],[{"start":{"row":356,"column":39},"end":{"row":356,"column":40},"action":"insert","lines":["t"],"id":154}],[{"start":{"row":356,"column":40},"end":{"row":356,"column":41},"action":"insert","lines":["i"],"id":155}],[{"start":{"row":356,"column":41},"end":{"row":356,"column":42},"action":"insert","lines":["o"],"id":156}],[{"start":{"row":356,"column":42},"end":{"row":356,"column":43},"action":"insert","lines":["n"],"id":157}],[{"start":{"row":356,"column":43},"end":{"row":356,"column":44},"action":"insert","lines":[" "],"id":158}],[{"start":{"row":356,"column":44},"end":{"row":356,"column":45},"action":"insert","lines":["/"],"id":159}],[{"start":{"row":356,"column":45},"end":{"row":356,"column":46},"action":"insert","lines":[" "],"id":160}],[{"start":{"row":356,"column":46},"end":{"row":356,"column":47},"action":"insert","lines":["c"],"id":161}],[{"start":{"row":356,"column":47},"end":{"row":356,"column":48},"action":"insert","lines":["o"],"id":162}],[{"start":{"row":356,"column":48},"end":{"row":356,"column":49},"action":"insert","lines":["u"],"id":163}],[{"start":{"row":356,"column":49},"end":{"row":356,"column":50},"action":"insert","lines":["n"],"id":164}],[{"start":{"row":356,"column":50},"end":{"row":356,"column":51},"action":"insert","lines":["t"],"id":165}],[{"start":{"row":358,"column":31},"end":{"row":358,"column":32},"action":"insert","lines":["."],"id":166}],[{"start":{"row":358,"column":32},"end":{"row":358,"column":33},"action":"insert","lines":["t"],"id":167}],[{"start":{"row":358,"column":33},"end":{"row":358,"column":34},"action":"insert","lines":["o"],"id":168}],[{"start":{"row":358,"column":33},"end":{"row":358,"column":34},"action":"remove","lines":["o"],"id":169}],[{"start":{"row":358,"column":32},"end":{"row":358,"column":33},"action":"remove","lines":["t"],"id":170}],[{"start":{"row":358,"column":32},"end":{"row":358,"column":33},"action":"insert","lines":["n"],"id":171}],[{"start":{"row":358,"column":33},"end":{"row":358,"column":34},"action":"insert","lines":["o"],"id":172}],[{"start":{"row":358,"column":34},"end":{"row":358,"column":35},"action":"insert","lines":["t"],"id":173}],[{"start":{"row":358,"column":35},"end":{"row":358,"column":36},"action":"insert","lines":["."],"id":174}],[{"start":{"row":358,"column":36},"end":{"row":358,"column":37},"action":"insert","lines":["t"],"id":175}],[{"start":{"row":358,"column":37},"end":{"row":358,"column":38},"action":"insert","lines":["o"],"id":176}],[{"start":{"row":358,"column":38},"end":{"row":358,"column":39},"action":"insert","lines":["B"],"id":177}],[{"start":{"row":358,"column":39},"end":{"row":358,"column":40},"action":"insert","lines":["e"],"id":178}],[{"start":{"row":358,"column":40},"end":{"row":358,"column":41},"action":"insert","lines":["D"],"id":179}],[{"start":{"row":358,"column":41},"end":{"row":358,"column":42},"action":"insert","lines":["e"],"id":180}],[{"start":{"row":358,"column":42},"end":{"row":358,"column":43},"action":"insert","lines":["f"],"id":181}],[{"start":{"row":358,"column":43},"end":{"row":358,"column":44},"action":"insert","lines":["i"],"id":182}],[{"start":{"row":358,"column":44},"end":{"row":358,"column":45},"action":"insert","lines":["n"],"id":183}],[{"start":{"row":358,"column":45},"end":{"row":358,"column":46},"action":"insert","lines":["e"],"id":184}],[{"start":{"row":358,"column":46},"end":{"row":358,"column":47},"action":"insert","lines":["d"],"id":185}],[{"start":{"row":358,"column":47},"end":{"row":358,"column":49},"action":"insert","lines":["()"],"id":186}],[{"start":{"row":358,"column":49},"end":{"row":358,"column":50},"action":"insert","lines":[";"],"id":187}],[{"start":{"row":358,"column":50},"end":{"row":358,"column":51},"action":"insert","lines":[" "],"id":188}],[{"start":{"row":358,"column":51},"end":{"row":358,"column":52},"action":"insert","lines":["/"],"id":189}],[{"start":{"row":358,"column":52},"end":{"row":358,"column":53},"action":"insert","lines":["/"],"id":190}],[{"start":{"row":358,"column":0},"end":{"row":359,"column":0},"action":"insert","lines":[" expect(averageDuration).not.toBeDefined(); //.toBeLessThan(1);",""],"id":191}],[{"start":{"row":359,"column":0},"end":{"row":360,"column":0},"action":"insert","lines":[" expect(averageDuration).not.toBeDefined(); //.toBeLessThan(1);",""],"id":192}],[{"start":{"row":358,"column":15},"end":{"row":358,"column":30},"action":"remove","lines":["averageDuration"],"id":193},{"start":{"row":358,"column":15},"end":{"row":358,"column":28},"action":"insert","lines":["totalDuration"]}],[{"start":{"row":359,"column":15},"end":{"row":359,"column":30},"action":"remove","lines":["averageDuration"],"id":194},{"start":{"row":359,"column":15},"end":{"row":359,"column":16},"action":"insert","lines":["c"]}],[{"start":{"row":359,"column":16},"end":{"row":359,"column":17},"action":"insert","lines":["n"],"id":195}],[{"start":{"row":359,"column":16},"end":{"row":359,"column":17},"action":"remove","lines":["n"],"id":196}],[{"start":{"row":359,"column":16},"end":{"row":359,"column":17},"action":"insert","lines":["o"],"id":197}],[{"start":{"row":359,"column":17},"end":{"row":359,"column":18},"action":"insert","lines":["u"],"id":198}],[{"start":{"row":359,"column":18},"end":{"row":359,"column":19},"action":"insert","lines":["n"],"id":199}],[{"start":{"row":359,"column":19},"end":{"row":359,"column":20},"action":"insert","lines":["t"],"id":200}],[{"start":{"row":346,"column":0},"end":{"row":348,"column":0},"action":"remove","lines":[" var start = Date.now();"," ",""],"id":201}],[{"start":{"row":346,"column":0},"end":{"row":348,"column":0},"action":"insert","lines":[" var start = Date.now();"," ",""],"id":203}],[{"start":{"row":358,"column":0},"end":{"row":360,"column":0},"action":"remove","lines":[" expect(totalDuration).not.toBeDefined(); //.toBeLessThan(1);"," expect(count).not.toBeDefined(); //.toBeLessThan(1);",""],"id":204}],[{"start":{"row":358,"column":52},"end":{"row":358,"column":53},"action":"remove","lines":["/"],"id":205}],[{"start":{"row":358,"column":51},"end":{"row":358,"column":52},"action":"remove","lines":["/"],"id":206}],[{"start":{"row":358,"column":50},"end":{"row":358,"column":51},"action":"remove","lines":[" "],"id":207}],[{"start":{"row":358,"column":49},"end":{"row":358,"column":50},"action":"remove","lines":[";"],"id":208}],[{"start":{"row":358,"column":48},"end":{"row":358,"column":49},"action":"remove","lines":[")"],"id":209}],[{"start":{"row":358,"column":47},"end":{"row":358,"column":48},"action":"remove","lines":["("],"id":210}],[{"start":{"row":358,"column":46},"end":{"row":358,"column":47},"action":"remove","lines":["d"],"id":211}],[{"start":{"row":358,"column":45},"end":{"row":358,"column":46},"action":"remove","lines":["e"],"id":212}],[{"start":{"row":358,"column":44},"end":{"row":358,"column":45},"action":"remove","lines":["n"],"id":213}],[{"start":{"row":358,"column":43},"end":{"row":358,"column":44},"action":"remove","lines":["i"],"id":214}],[{"start":{"row":358,"column":42},"end":{"row":358,"column":43},"action":"remove","lines":["f"],"id":215}],[{"start":{"row":358,"column":41},"end":{"row":358,"column":42},"action":"remove","lines":["e"],"id":216}],[{"start":{"row":358,"column":40},"end":{"row":358,"column":41},"action":"remove","lines":["D"],"id":217}],[{"start":{"row":358,"column":39},"end":{"row":358,"column":40},"action":"remove","lines":["e"],"id":218}],[{"start":{"row":358,"column":38},"end":{"row":358,"column":39},"action":"remove","lines":["B"],"id":219}],[{"start":{"row":358,"column":37},"end":{"row":358,"column":38},"action":"remove","lines":["o"],"id":220}],[{"start":{"row":358,"column":36},"end":{"row":358,"column":37},"action":"remove","lines":["t"],"id":221}],[{"start":{"row":358,"column":35},"end":{"row":358,"column":36},"action":"remove","lines":["."],"id":222}],[{"start":{"row":358,"column":34},"end":{"row":358,"column":35},"action":"remove","lines":["t"],"id":223}],[{"start":{"row":358,"column":33},"end":{"row":358,"column":34},"action":"remove","lines":["o"],"id":224}],[{"start":{"row":358,"column":32},"end":{"row":358,"column":33},"action":"remove","lines":["n"],"id":225}],[{"start":{"row":358,"column":31},"end":{"row":358,"column":32},"action":"remove","lines":["."],"id":226}],[{"start":{"row":358,"column":45},"end":{"row":358,"column":46},"action":"remove","lines":["1"],"id":227}],[{"start":{"row":358,"column":45},"end":{"row":358,"column":46},"action":"insert","lines":["1"],"id":228}],[{"start":{"row":358,"column":46},"end":{"row":358,"column":47},"action":"insert","lines":["6"],"id":229}]]},"ace":{"folds":[],"scrolltop":480,"scrollleft":0,"selection":{"start":{"row":23,"column":8},"end":{"row":23,"column":8},"isBackwards":false},"options":{"guessTabSize":true,"useWrapMode":false,"wrapToView":true},"firstLineState":{"row":67,"state":"no_regex","mode":"ace/mode/javascript"}},"timestamp":1442848982000,"hash":"70f792dfc6db8b0e0750dd60de59e9c27211434c"} |
@@ -104,3 +104,3 @@ var React = require('react'); | ||
nextProps.container.addEventListener('scroll', this.onScrollDebounced); | ||
this.setState(state); | ||
@@ -167,3 +167,2 @@ }, | ||
//todo add itemBuffer here instead | ||
var firstItemIndex = Math.max(0, Math.floor(listViewBox.top / itemHeight) - itemBuffer); | ||
@@ -180,4 +179,2 @@ var lastItemIndex = Math.min(itemCount, Math.ceil(listViewBox.bottom / itemHeight) + itemBuffer) - 1; | ||
//console.log('getItems.result', result); | ||
return result; | ||
@@ -184,0 +181,0 @@ }; |
{ | ||
"name": "react-virtual-list", | ||
"version": "1.6.1", | ||
"version": "1.7.1", | ||
"description": "Super simple virtualized list React component", | ||
@@ -30,3 +30,3 @@ "main": "dist/VirtualList.js", | ||
"dependencies": { | ||
"react": "^0.13.3" | ||
"react": "~0.13.x" | ||
}, | ||
@@ -33,0 +33,0 @@ "devDependencies": { |
@@ -104,3 +104,3 @@ var React = require('react'); | ||
nextProps.container.addEventListener('scroll', this.onScrollDebounced); | ||
this.setState(state); | ||
@@ -167,3 +167,2 @@ }, | ||
//todo add itemBuffer here instead | ||
var firstItemIndex = Math.max(0, Math.floor(listViewBox.top / itemHeight) - itemBuffer); | ||
@@ -180,4 +179,2 @@ var lastItemIndex = Math.min(itemCount, Math.ceil(listViewBox.bottom / itemHeight) + itemBuffer) - 1; | ||
//console.log('getItems.result', result); | ||
return result; | ||
@@ -184,0 +181,0 @@ }; |
@@ -31,3 +31,3 @@ var VirtualList = require('../dist/VirtualList.js'); | ||
var result = new VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
var result = VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
@@ -55,3 +55,3 @@ expect(result.itemsInView).toBeGreaterThan(0); | ||
var result = new VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
var result = VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
@@ -79,3 +79,3 @@ expect(result.itemsInView).toBe(0); | ||
var result = new VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
var result = VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
@@ -103,3 +103,3 @@ expect(result.itemsInView).toBe(0); | ||
var result = new VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
var result = VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
@@ -129,3 +129,3 @@ expect(result.itemsInView).toBe(5); | ||
var result = new VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
var result = VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
@@ -155,3 +155,3 @@ expect(result.itemsInView).toBe(5); | ||
var result = new VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
var result = VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
@@ -179,3 +179,3 @@ expect(result.itemsInView).toBe(6); | ||
var result = new VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
var result = VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
@@ -204,3 +204,3 @@ expect(result.firstItemIndex).toBe(0); | ||
var result = new VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
var result = VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
@@ -229,3 +229,3 @@ expect(result.firstItemIndex).toBe(17); | ||
var result = new VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, 4); | ||
var result = VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, 4); | ||
@@ -255,3 +255,3 @@ expect(result.firstItemIndex).toBe(0); | ||
var result = new VirtualList.getItems(viewBox, listBox, 5, itemHeight, itemCount); | ||
var result = VirtualList.getItems(viewBox, listBox, 5, itemHeight, itemCount); | ||
@@ -279,3 +279,3 @@ expect(result.itemsInView).toBeGreaterThan(5); | ||
var result = new VirtualList.getItems(viewBox, listBox, 5, itemHeight, itemCount); | ||
var result = VirtualList.getItems(viewBox, listBox, 5, itemHeight, itemCount); | ||
@@ -303,3 +303,3 @@ expect(result.itemsInView).toBe(5); | ||
var result = new VirtualList.getItems(viewBox, listBox, 5, itemHeight, itemCount); | ||
var result = VirtualList.getItems(viewBox, listBox, 5, itemHeight, itemCount); | ||
@@ -327,3 +327,3 @@ expect(result.itemsInView).toBe(5); | ||
var result = new VirtualList.getItems(viewBox, listBox, 5, itemHeight, itemCount); | ||
var result = VirtualList.getItems(viewBox, listBox, 5, itemHeight, itemCount); | ||
@@ -335,3 +335,3 @@ expect(result.itemsInView).toBe(15); | ||
var count = 1000000; | ||
var start = Date.now(); | ||
var totalDuration = 0; | ||
@@ -361,10 +361,16 @@ for (var i=0;i<count;i++) { | ||
var result = new VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
var start = Date.now(); | ||
var result = VirtualList.getItems(viewBox, listBox, itemBuffer, itemHeight, itemCount); | ||
var end = Date.now(); | ||
var duration = end - start; | ||
totalDuration += duration; | ||
} | ||
var end = Date.now(); | ||
var duration = end - start; | ||
var averageDuration = totalDuration / count; | ||
expect(duration).toBeLessThan(1000); | ||
expect(averageDuration).toBeLessThan(16); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
84246
827
Updatedreact@~0.13.x