SoftwareBrothers/fabricjs-viewport

fabricjs_viewport.js:131 Uncaught ReferenceError: _ is not defined

benjamij opened this issue · 2 comments

When using fabricjs-viewport with touch events, I get the following error:
Uncaught ReferenceError: _ is not defined - fabricjs_viewport.js:131

The problem seems to be with ex[touchProp] = _.map(event[touchProp], (function(_this) in:
Viewport.prototype.transform.

_ is from uderscore: Try to include this in your project:

<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>

Thanks! And thanks for this great library :)