Skip to content

Commit c42ea41

Browse files
committed
Update README.
1 parent 7bc2404 commit c42ea41

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,11 @@ In general, you probably want to use the [html](#html) tagged template literal i
206206

207207
Returns a new unique *identifier*. If *name* is specified, the *identifier*.id will be derived from the specified *name*, which may be useful for debugging. If DOM.uid is called repeatedly with the same *name*, every returned *identifier* is still unique (that is, different). Identifiers are useful in SVG: use *identifier*.href for IRI references, such as the [xlink:href](https://www.w3.org/TR/SVG/animate.html#HrefAttribute) attribute; use *identifier*.toString for functional notation, such as the [clip-path](https://www.w3.org/TR/SVG/masking.html#ClipPathProperty) presentation attribute.
208208

209-
For example, to clip the Mona Lisa to a circle of radius 320px:
209+
For example, to [clip the Mona Lisa](https://beta.observablehq.com/@mbostock/svg-clipping-test) to a circle of radius 320px:
210210

211211
```js
212212
{
213-
const clip = uid("clip");
213+
const clip = DOM.uid("clip");
214214
return svg`<svg width="640" height="640">
215215
<defs>
216216
<clipPath id="${clip.id}">
@@ -221,7 +221,7 @@ For example, to clip the Mona Lisa to a circle of radius 320px:
221221
clip-path="${clip}"
222222
width="640" height="640"
223223
preserveAspectRatio="xMidYMin slice"
224-
xlink:href="https://raw.githubusercontent.com/mbostock/9511ae067889eefa5537eedcbbf87dab/raw/98449954e2eea4ef96c177759635de49a970e8c6/mona-lisa.jpg"
224+
xlink:href="https://gist.githubusercontent.com/mbostock/9511ae067889eefa5537eedcbbf87dab/raw/944b6e5fe8dd535d6381b93d88bf4a854dac53d4/mona-lisa.jpg"
225225
></image>
226226
</svg>`;
227227
}

0 commit comments

Comments
 (0)