1.1.8 • Published 5 years ago

react-live-drawing-firebase v1.1.8

Weekly downloads
1
License
ISC
Repository
github
Last release
5 years ago

Canvas Drawing to firebase

Based on https://github.com/embiem/react-canvas-draw

Installation

npm install --save react-live-drawing-firebase

Usage

Person drawing:

import { ReactLiveDrawing } from "react-live-drawing-firebase";

<ReactLiveDrawing
  ref={(canvasDraw) => (drawingRef = canvasDraw)}
  db={fire.database().ref("draw-room")}
  {...props}
/>;

Person viewing

Live view

import {LiveViewer} from 'react-live-drawing-firebase'
<LiveViewer db={fireBase.ref('draws') {...props}} />

Recorder view

import { RecorderViewer } from "react-live-drawing-firebase";
<RecorderViewer db={firebase.href("draw")} {...props} />;

props

Functions

functions are only available on ReactLiveDrawing

clear

This function will clear the canvas, delete lines from firebase and will cause an update on the viewer

canvasDraw.clear();
1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.0.4

5 years ago

1.0.2

5 years ago

1.0.3

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago