Go to adjacent

Component for drawing in the presentation.

Consists of the button to enable / disable drawing mode and canvas - drawing area.

Install

bower install --save test/paint-tool

Link

<link rv-component="components/paint-tool">

Styles:

<link rel="stylesheet" href="compostyle.css">

Use

1. Need to add binder to draw on any element:

<button rv-paint>Paint</button>

2. When drawing mode is enabled, on this element automatically add class `active`.

Examples

Besides you can change paint-tool default values. To do this, add an object `paint` in app.json.

  • `lineWidth` *(number)* - painting line width in px
  • `color` *(string)* - painting line color
  • `opacity` *(number [0-1])* - painting line transparency

Default values

"lineWidth": 5,
"color": 'red',
"opacity": 0.5

Example (app.json)

"paint": {
"lineWidth": 8,
"color": "yellow",
"opacity": 0.6,
}