This project was generated with Angular CLI version 8.3.29.
Source code was forked from mostafazke/ng-whiteboard.
Add TouchEvent listeners for mobile.
cd ./
npm i
<!-- 这个组件需要额外的依赖 ng-colors -->
cd project/ng-whiteboard-complex
npm i
ng serve
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The app will automatically reload if you change any of the source files.
此项目基于ng-whiteboard修改,版本3.0.2。
ng-whiteboard 组件依赖的"perfect-freehand": "^1.2.0", 含有无法识别的ts语法
import type { xxx } from "module".
只删除了这个type 语法,其余源码逻辑都未做修改。尽量避免使用其他版本造成的功能缺失或api不一致。
原本使用的版本是"ngx-colors": "^3.5.2",降低成了 "^2.5.0", 但这只是个color picker,应该影响不大。
为了方便修改样式,实际项目中使用的whiteboard是引用了ng-whiteboard-complex的源码(文件名为ng-whiteboard-complex.component.ts),而不是导出为独立组件。此项目中该目录仅作测试使用。
Run ng g c component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory. Use the --prod
flag for a production build.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.