Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2a02884

Browse files
authored
SVGLoader: Make node transform parsing more robust. (#31985)
1 parent 2cbc7af commit 2a02884

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎examples/jsm/loaders/SVGLoader.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1502,8 +1502,8 @@ class SVGLoader extends Loader {
15021502

15031503
if ( node.nodeName === 'use' && ( node.hasAttribute( 'x' ) || node.hasAttribute( 'y' ) ) ) {
15041504

1505-
const tx = parseFloatWithUnits( node.getAttribute( 'x' ) );
1506-
const ty = parseFloatWithUnits( node.getAttribute( 'y' ) );
1505+
const tx = parseFloatWithUnits( node.getAttribute( 'x' ) ||0);
1506+
const ty = parseFloatWithUnits( node.getAttribute( 'y' ) ||0);
15071507

15081508
transform.translate( tx, ty );
15091509

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /