Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

fix(line-ripple): Fix CSP inline style rule #2491

Merged
merged 4 commits into from
Apr 2, 2018

Conversation

williamernest
Copy link
Contributor

Fixes: #2292

@codecov-io
Copy link

codecov-io commented Mar 30, 2018

Codecov Report

Merging #2491 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2491      +/-   ##
==========================================
- Coverage   98.87%   98.87%   -0.01%     
==========================================
  Files         102      102              
  Lines        4073     4072       -1     
  Branches      510      510              
==========================================
- Hits         4027     4026       -1     
  Misses         46       46
Impacted Files Coverage Δ
packages/mdc-line-ripple/foundation.js 100% <100%> (ø) ⬆️
packages/mdc-line-ripple/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcc7341...75729a5. Read the comment docs.

Copy link
Contributor

@kfranqueiro kfranqueiro left a comment

Choose a reason for hiding this comment

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

README update?

Copy link
Contributor

@moog16 moog16 left a comment

Choose a reason for hiding this comment

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

LGTM

`transform-origin: ${xCoordinate}px center`;

this.adapter_.setAttr('style', attributeString);
this.adapter_.setStyle('transform-origin', `${xCoordinate}px center`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this not need to be transformOrigin to work with element.style[propertyName]?

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevermind, I guess either one works, even in IE 11.

@@ -64,7 +64,7 @@ Method Signature | Description
--- | ---
`addClass(className: string) => void` | Adds a class to the root element
`removeClass(className: string) => void` | Removes a class from the root element
`setAttr(attr: string, value: string) => void` | Sets an attribute with a given value on the root element
`setStyle(propertyName: string, value: string) => void` | Sets the style attribute with a given `propertyName` and `value` on the root element
Copy link
Contributor

Choose a reason for hiding this comment

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

attribute -> property?

@@ -47,11 +47,11 @@ class MDCLineRippleAdapter {
hasClass(className) {}

/**
* Sets an attribute with a given value on the line ripple element.
* @param {string} attr
* Sets the style for a given attribute with a given value on the line ripple element.
Copy link
Contributor

Choose a reason for hiding this comment

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

attribute -> property?

@williamernest williamernest merged commit 4f1cdc1 into master Apr 2, 2018
@williamernest williamernest deleted the fix/line-ripple/fix-csp-rule branch April 2, 2018 16:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants