Fabricjs build 1.7.15 with gesture support

ぃ、小莉子 提交于 2019-12-01 01:59:20

Actually the only way to build it is using the github repository.

get yourself a copy of nodejs and npm, and git.

step 1 clone the repository:

git clone https://github.com/kangax/fabric.js.git

you will get a new folder called fabric.js. step 2 enter the folder and install fabric, this should give you uglifyjs that is needed to complete the build.

cd fabric.js npm install ./

step 3 switch to version 1.x

git checkout 1.x

step 4 run the build command as advised in the repository

nodejs build.js modules=ALL exclude=node

If you do not want to do all this, since fabric is built in plain es5, you can still include fabricjs in your page and include the gesture module immediately after.

The gesture module is this file here:

https://github.com/kangax/fabric.js/blob/1.x/src/mixins/canvas_gestures.mixin.js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!