MCPcopy Index your code
hub / github.com/CreateJS/TweenJS / parseMulti

Function parseMulti

src/tweenjs/plugins/CSSPlugin.js:264–276  ·  view source on GitHub ↗
(str, compare, arr)

Source from the content-addressed store, hash-verified

262 // this was separated so that it can be used for other multi element styles in the future
263 // ex. transform-origin, border, etc.
264 function parseMulti(str, compare, arr) {
265 // TODO: add logic to deal with "0" values? Troublesome because the browser automatically appends a unit for some 0 values.
266 do {
267 // pull out the next value (ex. "20px", "12.4rad"):
268 var result = s.TRANSFORM_VALUE_RE.exec(str);
269 if (!result) { return arr; }
270 if (!arr) { arr = []; }
271 arr.push(+result[1], result[2]);
272
273 // check that the units match (ex. "px" vs "em"):
274 if (compare && (compare[arr.length-1] !== result[2])) { console.log("transform units don't match: ",arr[0], compare[arr.length-1], result[2]); compare=null; } // unit doesn't match
275 } while(true);
276 }
277
278 function writeTransform(list0, list1, ratio) {
279 // check if we should just use the original transform strings:

Callers 1

parseTransformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected