vue-image-marker

Image container for adding icon marker to the image.
1,112 6
Install
npm install vue-image-marker
Latest Version:0.1.4
Vue:2
License:MIT
Last Updated:Mar 7, 2019
Links: GitHub  ·  npm
Maintainer: jarvisniu

vue-image-marker

Image container for adding icon marker to the image.

Demo

Demo

Usage

Install:

npm i vue-image-marker

Import:

import Vue from 'vue'
import VueImageMarker from 'vue-image-marker'

Vue.component('VImageMarker', VueImageMarker)

Use:

<v-image-marker src="foo.jpg" :padding="20">
  <div
    v-for="marker in markers"
    :style="{
      position: 'absolute',
      width: '10px',
      height: '10px',
      left: `calc(${ (marker.x * 100) }% - 5px)`,
      top: `calc(${ (marker.y * 100) }% - 5px)`,
      backgroundColor: 'yellow',
    }"
  ></div>
</v-image-marker>

API: Props

  • src: Url of the image where the markers overlaid on.
  • padding: Container padding, default is 0.

License

MIT

Version History

Version Released Vue License
0.1.4 ^2.6.8 MIT
0.1.3 ^2.6.8 MIT
0.1.2 ^2.6.8 MIT
0.1.1 ^2.6.8 MIT
0.1.0 ^2.6.8 MIT