This repository was archived by the owner on Nov 22, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 1+ <!doctype html>
2+ < html >
3+ < head >
4+ < title > Literally Canvas Core - Simple Example</ title >
5+ < meta charset ="UTF-8 ">
6+ < meta name ="viewport " content ="width=device-width, user-scalable=no " />
7+ < style >
8+ body {
9+ background : # EEE ;
10+ }
11+ .literally {
12+ width : 400px ;
13+ height : 400px ;
14+ position : relative;
15+ }
16+ .literally canvas {
17+ position : absolute;
18+ top : 0px ;
19+ left : 0px ;
20+ }
21+ </ style >
22+ </ head >
23+
24+ < body >
25+ < div class ="literally "> </ div >
26+ < script src ="../lib/index.js "> </ script >
27+
28+ < script type ="text/javascript ">
29+ const LiterallyCanvas = LC . default ;
30+ const mainDiv = document . querySelector ( '.literally' ) ;
31+ const lc = new LiterallyCanvas ( mainDiv , {
32+ ...LiterallyCanvas . defaultOptions ,
33+ defaultStrokeWidth : 10 ,
34+ backgroundColor : '#FFF' ,
35+ } ) ;
36+ window . demoLC = lc ;
37+ </ script >
38+ </ body >
39+ </ html >
Original file line number Diff line number Diff line change 33 "version" : " 0.5.2" ,
44 "description" : " HTML5 drawing widget - core lib" ,
55 "main" : " lib/index.js" ,
6+ "files" : [
7+ " lib/*" ,
8+ " src/*"
9+ ],
610 "scripts" : {
711 "test" : " echo \" Error: no test specified\" && exit 1" ,
812 "bundle" : " gulp bundle" ,
You can’t perform that action at this time.
0 commit comments