Skip to content

Commit

Permalink
fix: disable fabric caching for mobile devices (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flyer3d authored Nov 15, 2023
1 parent 2852118 commit ddf8044
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/drawing/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/drawing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ulms/ui-drawing",
"version": "3.3.13",
"version": "3.3.15",
"description": "Whiteboard for uLMS",
"keywords": [
"lerna"
Expand Down
3 changes: 3 additions & 0 deletions packages/drawing/src/drawing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,11 @@ export class Drawing extends React.Component {
const {
clientId,
onLockSelection,
mobile,
} = this.props

fabric.Object.prototype.objectCaching = !mobile

this.canvas = new fabric.Canvas('canvas', {
enablePointerEvents: 'PointerEvent' in window,
preserveObjectStacking: true, // Чтобы выделенный объект не выходил на верхний слой
Expand Down

0 comments on commit ddf8044

Please sign in to comment.