Commit 3ac09d2
committed
Fix null transform attribute warning in Firefox.
Strictly speaking, the transform attribute should never be set to null;
it should be set to "translate(0)" for the identity transform, or it
should be removed using removeAttribute("transform").
Setting this attribute to null causes a warning to appear in Firefox:
"Unexpected value null parsing transform attribute."
This occurs when using d3.transform(null), e.g. to interpolate to or
from a non-existent transform attribute (null).
This fix checks whether the value is null, and if so, returns an
identity transform.1 parent 0c7d186 commit 3ac09d2
3 files changed
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4633 | 4633 | | |
4634 | 4634 | | |
4635 | 4635 | | |
4636 | | - | |
4637 | | - | |
| 4636 | + | |
| 4637 | + | |
| 4638 | + | |
| 4639 | + | |
4638 | 4640 | | |
4639 | 4641 | | |
4640 | 4642 | | |
| |||
0 commit comments