Skip to content

Commit

Permalink
disable context menu so that ctrl-click doesn't cause context menu to…
Browse files Browse the repository at this point in the history
… appear on osx in texture editor ctrl+drag scaling
  • Loading branch information
justin-hackin committed Sep 17, 2024
1 parent 0e9e006 commit e423912
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
12 changes: 12 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions packages/widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"@types/react-dom": "^17.0.9",
"canvg": "^3.0.6",
"clsx": "^1.1.1",
"disable-context-menu": "^1.0.1",
"fluent-svg-path-ts": "*",
"js-file-download": "^0.4.12",
"lodash-es": "^4.17.21",
Expand Down
4 changes: 4 additions & 0 deletions packages/widgets/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ import './widgets';
import { workspaceStore } from 'svg-widget-studio';
import { connectReduxDevTools } from 'mobx-keystone';
import * as mobx from 'mobx';

// eslint-disable-next-line import/no-extraneous-dependencies
import remotedev from 'remotedev';
import { disableContextMenu } from 'disable-context-menu';
import { App } from '@/App';

render(
(<App />),
document.getElementById('app'),
);

disableContextMenu();

if (import.meta.env.MODE === 'development') {
// needed for mobx-prettier chrome extension
window.mobx = mobx;
Expand Down

0 comments on commit e423912

Please sign in to comment.