mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
commit
8a207afaea
2 changed files with 13 additions and 1 deletions
|
@ -541,7 +541,13 @@ export default class Umap extends ServerStored {
|
|||
if (SAVEMANAGER.isDirty) this.saveAll()
|
||||
break
|
||||
case 'z':
|
||||
if (SAVEMANAGER.isDirty) this.askForReset()
|
||||
if (Utils.isWritable(event.target)) {
|
||||
used = false
|
||||
break
|
||||
}
|
||||
if (SAVEMANAGER.isDirty) {
|
||||
this.askForReset()
|
||||
}
|
||||
break
|
||||
case 'm':
|
||||
this._leafletMap.editTools.startMarker()
|
||||
|
|
|
@ -465,6 +465,12 @@ export class WithEvents {
|
|||
}
|
||||
}
|
||||
|
||||
export function isWritable(element) {
|
||||
if (['TEXTAREA', 'INPUT'].includes(element.tagName)) return true
|
||||
if (element.isContentEditable) return true
|
||||
return false
|
||||
}
|
||||
|
||||
export const COLORS = [
|
||||
'Black',
|
||||
'Navy',
|
||||
|
|
Loading…
Reference in a new issue