update svg example

This commit is contained in:
Evan You 2014-09-25 13:45:10 -04:00
parent 7df70e7963
commit 611486c036
2 changed files with 8 additions and 9 deletions

View File

@ -10,19 +10,19 @@
<!-- template for the polygraph component. -->
<script type="text/x-template" id="polygraph-template">
<svg width="200" height="200">
<polygon v-attr="points: points"></polygon>
<polygon v-attr="points:points"></polygon>
<circle cx="100" cy="100" r="80"></circle>
<text v-component="axis-label" v-repeat="stats" v-attr="x:x, y:y">
<text v-repeat="stats" v-component="axis-label" v-attr="x:x, y:y">
{{label}}
</text>
</svg>
</script>
<!-- demo root element -->
<div id="demo">
<!-- Use the component -->
<svg v-component="polygraph" v-with="stats:stats"></svg>
<svg width="200" height="200">
<g v-component="polygraph" v-with="stats:stats"></g>
</svg>
<!-- controls -->
<div v-repeat="stats">
<label>{{label}}</label>

View File

@ -11,7 +11,6 @@ var stats = [
// A resusable polygon graph component
Vue.component('polygraph', {
template: '#polygraph-template',
replace: true,
computed: {
// a computed property for the polygon's points
points: function () {