Skip to content

Commit b580503

Browse files
committed
Good looking version of image preview
1 parent ab0bea6 commit b580503

File tree

3 files changed

+154
-193
lines changed

3 files changed

+154
-193
lines changed

Example/Reanimated/AnimatedImplementation.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ const add = function(a, b) {
2626
return new AnimatedOp([adapt(a), adapt(b)], ([a, b]) => a + b);
2727
};
2828

29+
const sub = function(a, b) {
30+
return new AnimatedOp([adapt(a), adapt(b)], ([a, b]) => a - b);
31+
};
32+
2933
const pow = function(a, b) {
3034
return new AnimatedOp([adapt(a), adapt(b)], ([a, b]) => Math.pow(a, b));
3135
};
@@ -573,7 +577,7 @@ module.exports = {
573577
* See http://facebook.github.io/react-native/docs/animated.html#add
574578
*/
575579
add,
576-
580+
sub,
577581
cond,
578582
block,
579583
set,

Example/Reanimated/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function adapt(v) {
66
}
77

88
export function val(v) {
9-
return v.__getValue ? v.__getValue() : v;
9+
return v && v.__getValue ? v.__getValue() : v || 0;
1010
}
1111

1212
export function proxyAnimatedObject(target) {

0 commit comments

Comments
 (0)