* create a simple clone from the input used for storage of firstInput and firstMultiple * @param {Object} input * @returns {Object} clonedInputData
(input)
| 92952 | * @param {Object} input |
| 92953 | * @returns {Object} clonedInputData |
| 92954 | */ function simpleCloneInputData(input) { |
| 92955 | // make a simple copy of the pointers because we will get a reference if we don't |
| 92956 | // we only need clientXY for the calculations |
| 92957 | var pointers = []; |
| 92958 | var i = 0; |
| 92959 | while(i < input.pointers.length){ |
| 92960 | pointers[i] = { |
| 92961 | clientX: round(input.pointers[i].clientX), |
| 92962 | clientY: round(input.pointers[i].clientY) |
| 92963 | }; |
| 92964 | i++; |
| 92965 | } |
| 92966 | return { |
| 92967 | timeStamp: now(), |
| 92968 | pointers: pointers, |
| 92969 | center: getCenter(pointers), |
| 92970 | deltaX: input.deltaX, |
| 92971 | deltaY: input.deltaY |
| 92972 | }; |
| 92973 | } |
| 92974 | /** |
| 92975 | * get the center of all the pointers |
| 92976 | * @param {Array} pointers |
no test coverage detected