0.2.3 • Published 5 years ago

vue-drawing v0.2.3

Weekly downloads
42
License
MIT
Repository
github
Last release
5 years ago

vue drawing

This is a very simple online drawing board based on Vue.js and paper.js

It is convenient to use it in your project if you like it.

Simple stroke, redo, undo, text input will be supported.

Vue Drawing is under development, and not all core feature is available. Anyway, all the fundamental feature will come out soon, for I am using it in my own project.

To use it, install it as a dependency. It is just a normal Vue plugin.

npm install vue-drawing

then register it in your vue project.

import VueDrawing from "VueDrawing";

Vue.use(VueDrawing);

new Vue()       // register all plugins before instantiate Vue

then you can use the tag anywhere you like in your project. If you want to export the canvas, just click the button on the right, and an event will be triggered, which single parameter will be the SVG representation of the canvas as a String.

<template>
  <vue-drawing @image-export="exportHandler"></vue-drawing>
</template>

<script>
  export default {
    // other code in a usual .vue file
    methods: {
      exportHandler (svg) {
        console.log(svg)
      }
    }
  }
</script>

You can customize the width and height of the canvas in this way.

<vue-drawing :width="1000" :height="1000"></vue-drawing>

The default width and height is 500 and 300 respectively.

0.2.3

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago