``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
27 lines
770 B
JavaScript
27 lines
770 B
JavaScript
"use strict";
|
|
|
|
exports.__esModule = true;
|
|
exports["default"] = shouldStopAnimation;
|
|
|
|
// usage assumption: currentStyle values have already been rendered but it says
|
|
// nothing of whether currentStyle is stale (see unreadPropStyle)
|
|
function shouldStopAnimation(currentStyle, style, currentVelocity) {
|
|
for (var key in style) {
|
|
if (!Object.prototype.hasOwnProperty.call(style, key)) {
|
|
continue;
|
|
}
|
|
|
|
if (currentVelocity[key] !== 0) {
|
|
return false;
|
|
}
|
|
|
|
var styleValue = typeof style[key] === 'number' ? style[key] : style[key].val; // stepper will have already taken care of rounding precision errors, so
|
|
// won't have such thing as 0.9999 !=== 1
|
|
|
|
if (currentStyle[key] !== styleValue) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return true;
|
|
} |