File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 1010 },
1111 "repository" : {
1212 "type" : " git" ,
13- "url" : " git+https://github.com/WindrunnerMax/CVEditor .git"
13+ "url" : " git+https://github.com/WindRunnerMax/CanvasEditor .git"
1414 },
1515 "keywords" : [],
1616 "author" : " " ,
1717 "license" : " MIT" ,
1818 "bugs" : {
19- "url" : " https://github.com/WindrunnerMax/CVEditor /issues"
19+ "url" : " https://github.com/WindRunnerMax/CanvasEditor /issues"
2020 },
21- "homepage" : " https://github.com/WindrunnerMax/CVEditor " ,
21+ "homepage" : " https://github.com/WindRunnerMax/CanvasEditor " ,
2222 "devDependencies" : {
2323 "@typescript-eslint/eslint-plugin" : " 6.12.0" ,
2424 "@typescript-eslint/parser" : " 6.12.0" ,
Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ export class NativeEvent {
6161 } ;
6262
6363 private onMouseDown = ( e : MouseEvent ) => {
64+ // 非鼠标主按键不认为是 MouseDown
65+ if ( e . button !== MOUSE_BUTTON . MAIN ) return void 0 ;
6466 this . editor . state . set ( EDITOR_STATE . MOUSE_DOWN , true ) ;
6567 this . event . trigger ( NATIVE_EVENTS . MOUSE_DOWN , e ) ;
6668 } ;
@@ -121,6 +123,7 @@ export class NativeEvent {
121123 container . addEventListener ( NATIVE_EVENTS . MOUSE_WHEEL , this . onMouseWheel ) ;
122124 container . addEventListener ( NATIVE_EVENTS . DROP , this . onDrop ) ;
123125 container . addEventListener ( NATIVE_EVENTS . DROP_OVER , this . onDropOver ) ;
126+ container . addEventListener ( NATIVE_EVENTS . CONTEXT_MENU , this . onContextMenu ) ;
124127 container . addEventListener ( NATIVE_EVENTS . CLICK , this . onClick ) ;
125128 document . addEventListener ( NATIVE_EVENTS . COPY , this . onCopy ) ;
126129 document . addEventListener ( NATIVE_EVENTS . CUT , this . onCut ) ;
Original file line number Diff line number Diff line change 77 < title > Canvas Editor</ title >
88 </ head >
99 < body >
10- < % if (process.env.NODE_ENV === ' production' ) { %>
10+ < % if (process.env.NODE_ENV === " production" ) { %>
1111 < script
12- src ="https://unpkg. com/react@ 17.0.2/umd/react.production.min.js "
12+ src ="https://registry.npmmirror. com/react/ 17.0.2/files /umd/react.production.min.js "
1313 type ="application/javascript "
1414 referrerpolicy ="no-referrer "
1515 crossorigin
1616 > </ script >
1717 < script
18- src ="https://unpkg. com/react-dom@ 17.0.2/umd/react-dom.production.min.js "
18+ src ="https://registry.npmmirror. com/react-dom/ 17.0.2/files /umd/react-dom.production.min.js "
1919 type ="application/javascript "
2020 referrerpolicy ="no-referrer "
2121 crossorigin
2222 > </ script >
2323 < % } else { %>
2424 < script
25- src ="https://unpkg. com/react@ 17.0.2/umd/react.development.js "
25+ src ="https://registry.npmmirror. com/react/ 17.0.2/files /umd/react.development.js "
2626 type ="application/javascript "
2727 referrerpolicy ="no-referrer "
2828 crossorigin
2929 > </ script >
3030 < script
31- src ="https://unpkg. com/react-dom@ 17.0.2/umd/react-dom.development.js "
31+ src ="https://registry.npmmirror. com/react-dom/ 17.0.2/files /umd/react-dom.development.js "
3232 type ="application/javascript "
3333 referrerpolicy ="no-referrer "
3434 crossorigin
You can’t perform that action at this time.
0 commit comments