Explorar el Código

simplify svg example

Evan You hace 11 años
padre
commit
19cfc9dd16
Se han modificado 2 ficheros con 1 adiciones y 7 borrados
  1. 1 1
      examples/svg/index.html
  2. 0 6
      examples/svg/svg.js

+ 1 - 1
examples/svg/index.html

@@ -12,7 +12,7 @@
     <script type="text/x-template" id="polygraph-template">
       <polygon v-attr="points:points"></polygon>
       <circle cx="100" cy="100" r="80"></circle>
-      <text v-repeat="stats" v-component="axis-label" v-attr="x:x, y:y">
+      <text v-repeat="stats" v-component="axis-label" v-attr="x:point.x, y:point.y">
         {{label}}
       </text>
     </script>

+ 0 - 6
examples/svg/svg.js

@@ -31,12 +31,6 @@ Vue.component('polygraph', {
             this.$index,
             this.$parent.stats.length
           )
-        },
-        x: function () {
-          return this.point.x - 4
-        },
-        y: function () {
-          return this.point.y + 4
         }
       }
     }