Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
vue-polygon-cropper
Advanced tools
Vue polygon cropper lets you to crop image with any numbers of points with redo and undo functionality.
Vue polygon cropper lets you to crop image with any numbers of points with redo and undo functionality.
npm install --save vue-polygon-cropper
or with yarn
yarn add vue-polygon-cropper
Checkout here gobeam.github.io/vue-polygon-cropper/
Full Example with implementation here Example
// Global
import Vue from 'vue';
import VuePolygonCropper from 'vue-polygon-cropper';
Vue.component(VuePolygonCropper);
// Local
import VueCropper from 'vue-polygon-cropper';
export default {
components: { VueCropper}
}
...
<template>
<div id="app">
<polygon-crop :imageSource="'/demo.png'" ref="canvas"></polygon-crop>
<button @click.prevent="crop">Crop</button>
<button @click.prevent="undo">Undo</button>
<button @click.prevent="redo">Redo</button>
<button @click.prevent="reset">Reset</button>
</div>
</template>
<script>
export default {
name: 'App',
methods: {
crop: function () {
this.$refs.canvas.crop();
},
undo: function () {
this.$refs.canvas.undo();
},
redo: function () {
this.$refs.canvas.redo();
},
reset: function () {
this.$refs.canvas.reset();
}
}
};
</script>
...
Name | Type | Required | Description |
---|---|---|---|
imageSource | String | required | Image url or base64 to load on canvas. |
canvasClass | String | optional | Pass class to canvas to load your custom style. |
wrapperClass | String | optional | Pass class to div wrapper of canvas to load your custom style. |
pointerClass | String | optional | Pass class to pointer to load your custom style and customize it. |
showCanvas | Boolean | optional | Default true but pass false in order to hide image canvas. |
showPointer | Boolean | optional | Default true but pass false in order to hide pointers. |
width | Number | optional | Pass width to canvas. |
height | Number | optional | Pass height to canvas. |
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Released under the MIT License - see LICENSE.txt
for details.
FAQs
Vue polygon cropper lets you to crop image with any numbers of points with redo and undo functionality.
The npm package vue-polygon-cropper receives a total of 0 weekly downloads. As such, vue-polygon-cropper popularity was classified as not popular.
We found that vue-polygon-cropper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.