prevent right click on canvas work
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { useEffect, useState } from 'react'
|
||||
import { SyntheticEvent, useEffect, useState } from 'react'
|
||||
|
||||
export function dataURItoBlob(dataURI: string) {
|
||||
const mime = dataURI.split(',')[0].split(':')[1].split(';')[0]
|
||||
@@ -182,3 +182,8 @@ export function keepGUIAlive() {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export function isRightClick(ev: SyntheticEvent) {
|
||||
const mouseEvent = ev.nativeEvent as MouseEvent
|
||||
return mouseEvent.button === 2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user