0.3.71 • Published 4 years ago

vue-fabric-wrapper v0.3.71

Weekly downloads
477
License
MIT
Repository
github
Last release
4 years ago

vue-fabric-wrapper

Netlify Status

Stick Man Example: Edit StickMan

Currently implemented the following Fabric Objects:

Fabric.Canvas, Fabric.Circle, Fabric.Ellipse, Fabric.Group, Fabric.ImageFromURL, Fabric.Line, Fabric.Path, Fabric.Polygon, Fabric.Polyline, Fabric.Rectangle, Fabric.SVGFromURL, Fabric.Text, Fabric.Triangle

⚙️ Installation

$ npm install vue-fabric-wrapper

📄 Documents

Link

🚀 How to use in Vue

<template>
  <div id="app">
    <fabric-canvas>
      <fabric-circle :id="3"></fabric-circle>
    </fabric-canvas>
  </div>
</template>

<script>
import vueFabricWrapper from "vue-fabric-wrapper";

export default {
  name: "App",
  components: {
    FabricCanvas: vueFabricWrapper.FabricCanvas,
    FabricCircle: vueFabricWrapper.FabricCircle
  }
};
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>

🚀 How to use in Nuxt

Create Plugin with the following example code

import Vue from 'vue';
import vueFabricWrapper from 'vue-fabric-wrapper';

Vue.component("FabricCanvas", vueFabricWrapper.FabricCanvas)
Vue.component("FabricCircle", vueFabricWrapper.FabricCircle)

Add this to nuxt.config and use mode client

module.exports = {
	plugins: [
			{ src: "@/plugins/fabric.js", mode: "client" }
		]
}

Finally use client-only to render only on the client side

<template>
  <client-only>
    <fabric-canvas>
      <fabric-circle :id="2"></fabric-circle>
    </fabric-canvas>
  </client-only>
</template>

<script>
export default {

};
</script>

<style>
</style>

⭐️ Show Your Support

Please give a ⭐️ if this project helped you!

👏 Contributing

If you have any questions or requests or want to contribute to vue-fabric-wrapper or other packages, please write the issue or give me a Pull Request freely.

🐞 Bug Report

If you find a bug, please report to us opening a new Issue on GitHub.

⚙️ Development

npm run serve

Runs the app in the development mode. Open http://localhost:8080 to view it in the browser.

The page will reload if you make edits. You will also see any lint errors in the console.

0.3.71

4 years ago

0.3.70

4 years ago

0.3.69

4 years ago

0.3.68

4 years ago

0.3.67

4 years ago

0.3.66

4 years ago

0.3.65

4 years ago

0.3.64

4 years ago

0.3.63

4 years ago

0.3.62

4 years ago

0.3.61

4 years ago

0.3.60

4 years ago

0.3.50

4 years ago

0.3.40

4 years ago

0.3.35

4 years ago

0.3.34

4 years ago

0.3.33

4 years ago

0.3.32

4 years ago

0.3.31

4 years ago

0.3.30

4 years ago

0.3.20

4 years ago

0.3.10

4 years ago

0.3.0

4 years ago

0.2.3

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.31

4 years ago

0.1.30

4 years ago

0.1.29

4 years ago

0.1.28

4 years ago

0.1.27

4 years ago

0.1.26

4 years ago

0.1.25

4 years ago

0.1.23

4 years ago

0.1.22

4 years ago

0.1.21

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago