Skip to content

Commit 2cf4c67

Browse files
committed
fix svg example post component change
1 parent 15592f0 commit 2cf4c67

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

examples/svg/index.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,12 @@
1212
<script type="text/x-template" id="polygraph-template">
1313
<polygon v-attr="points:points"></polygon>
1414
<circle cx="100" cy="100" r="80"></circle>
15-
<text v-repeat="stats" v-component="axis-label" v-attr="x:point.x, y:point.y">
16-
{{label}}
17-
</text>
15+
<text v-repeat="stats" v-component="axis-label"></text>
16+
</script>
17+
18+
<!-- template for the axis label component. -->
19+
<script type="text/x-template" id="axis-label-template">
20+
<text v-attr="x:point.x, y:point.y">{{label}}</text>
1821
</script>
1922

2023
<!-- demo root element -->

examples/svg/svg.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Vue.component('polygraph', {
2424
components: {
2525
// a sub component for the labels
2626
'axis-label': {
27+
template: '#axis-label-template',
28+
replace: true,
2729
computed: {
2830
point: function () {
2931
return valueToPoint(

0 commit comments

Comments
 (0)