Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/dimension-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
'perspective',
'right',
'shape-margin',
'stroke-dashoffset',
'text-indent',
'top',
'vertical-align',
Expand Down
2 changes: 1 addition & 1 deletion src/property-interpolation.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
paddingRight: '0px',
paddingTop: '0px',
right: 'auto',
strokeDashoffset: '0px',
textIndent: '0px',
textShadow: '0px 0px 0px transparent',
top: 'auto',
Expand Down Expand Up @@ -124,4 +125,3 @@
scope.propertyInterpolation = propertyInterpolation;

})(webAnimationsShared, webAnimations1, webAnimationsTesting);

4 changes: 4 additions & 0 deletions test/js/dimension-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,8 @@ suite('dimension-handler', function() {
assert.isUndefined(webAnimations1.consumeLengthOrPercent('(10px)'));
assert.isUndefined(webAnimations1.consumeLengthOrPercent('calc(10px,10px)'));
});
test('interpolation of more specific properties', function() {
assert.equal(webAnimations1.propertyInterpolation('strokeDashoffset', '10px', '50px')(0.25), '20px');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be able to interpolate multi valued values e.g. '10px 20px' to '50px 60px'.
If it doesn't can you file an issue to add support for it? I won't block this patch on supporting that right away.

lgtm.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out stroke-dashoffset does not support multiple values; that's stroke-dasharray. Submitting as-is.

assert.equal(webAnimations1.propertyInterpolation('textIndent', '10px', '50px')(0.25), '20px');
});
});