1.4.1 • Published 4 years ago

react-native-match-sketchpad v1.4.1

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

Installation

npm install react-native-match-sketchpad --save

How To Use

import { Sketchpad } from "react-native-match-sketchpad";

let sketchData = '{"background":[{"image":"/sap/sports/fnd/appsvc/resources/service/resources.xsjs/SKETCHPAD_BACKGROUND","scaleFactor":1}],"items":[{"y":372,"x":474,"scale":0.15,"image":"/sap/sports/trm/ui/catalog/images/cone_red_big.png","z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape16-rp8x0o0c"},{"image":"/sap/sports/trm/ui/catalog/images/cone_red_big.png","scale":0.15,"x":705,"y":377,"z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape16-rp8x0o0c-cc706tuh"},{"y":792,"x":472,"scale":0.15,"image":"/sap/sports/trm/ui/catalog/images/cone_red_big.png","z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape16-rp8x0o0c-cc706tuh-ysxzxprs"},{"image":"/sap/sports/trm/ui/catalog/images/cone_red_big.png","scale":0.15,"x":925,"y":793,"z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape16-rp8x0o0c-cc706tuh-ysxzxprs-kabfxrld"},{"y":380,"x":942,"scale":0.15,"image":"/sap/sports/trm/ui/catalog/images/cone_red_big.png","z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape16-rp8x0o0c-cc706tuh-ysxzxprs-kabfxrld-cvo3x9xf"},{"image":"/sap/sports/trm/ui/catalog/images/cone_red_big.png","scale":0.15,"x":721,"y":791,"z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape16-rp8x0o0c-cc706tuh-ysxzxprs-kabfxrld-cvo3x9xf-xbgaqnux"},{"y":711,"x":498,"scale":0.3,"image":"/sap/sports/trm/ui/catalog/images/blue4.png","z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape17-6dn1veqr"},{"image":"/sap/sports/trm/ui/catalog/images/blue4.png","scale":0.3,"x":499,"y":440,"z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape17-6dn1veqr-hm01s8tj"},{"y":447,"x":706,"scale":0.3,"image":"/sap/sports/trm/ui/catalog/images/blue4.png","z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape17-6dn1veqr-hm01s8tj-55te1h4n"},{"image":"/sap/sports/trm/ui/catalog/images/blue4.png","scale":0.3,"x":725,"y":718,"z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape17-6dn1veqr-hm01s8tj-55te1h4n-c1f26d58"},{"y":439,"x":930,"scale":0.3,"image":"/sap/sports/trm/ui/catalog/images/blue4.png","z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape17-6dn1veqr-hm01s8tj-55te1h4n-c1f26d58-jmaz3phb"},{"y":721,"x":916,"scale":0.3,"image":"/sap/sports/trm/ui/catalog/images/blue4.png","z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape17-6dn1veqr-hm01s8tj-55te1h4n-c1f26d58-8cc0fery"},{"y":504,"x":546,"scale":0.3,"image":"/sap/sports/trm/ui/catalog/images/red5.png","z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape18-170eb1aa"},{"image":"/sap/sports/trm/ui/catalog/images/red5.png","scale":0.3,"x":573,"y":643,"z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape18-170eb1aa-vo3v3mhi"},{"y":636,"x":768,"scale":0.3,"image":"/sap/sports/trm/ui/catalog/images/red5.png","z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape18-170eb1aa-vo3v3mhi-7kytvtug"},{"image":"/sap/sports/trm/ui/catalog/images/red5.png","scale":0.3,"x":715,"y":545,"z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape18-170eb1aa-vo3v3mhi-7kytvtug-cioad70c"},{"y":715,"x":530,"scale":0.08,"image":"/sap/sports/trm/ui/catalog/images/football.png","z":0,"visible":true,"showSelection":true,"rotation":0,"mirror":false,"className":"sap.sports.ui.controls.sketchpad.SketchpadShape","id":"__shape19-inaltocl"}]}';

let width = Dimension.get("window").width;

let isEditMode = true;

<View>
...
<Sketchpad fullMode={false} data={sketchData} isEditable={isEditMode} width={width} />
...
</View>
1.4.1

4 years ago

1.3.30

4 years ago

1.3.28

4 years ago

1.3.29

4 years ago

1.3.27

4 years ago

1.3.26

4 years ago

1.2.27

4 years ago

1.2.18

4 years ago

1.2.11

4 years ago

1.1.16

4 years ago

1.1.15

4 years ago

1.1.14

4 years ago

1.1.13-2

4 years ago

1.1.1-3.2

4 years ago

1.1.13

4 years ago

1.1.9

4 years ago

1.1.7

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

0.12.31

4 years ago

0.12.30

4 years ago

0.12.29

4 years ago

0.12.27

4 years ago

0.12.22

4 years ago

0.12.18

4 years ago

0.12.17

4 years ago

0.12.14

4 years ago

0.12.13

4 years ago

0.12.12

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago