Browse Source

fix: 修复编辑时拖拽后完成编辑的问题

master
Cmen 3 years ago
parent
commit
f9f189b9b4
  1. 1
      src/editor/Plot/Tools/MinimalTools.tsx
  2. 1
      src/map/MapEditor.ts

1
src/editor/Plot/Tools/MinimalTools.tsx

@ -31,7 +31,6 @@ const MinimalButton = (props: MinimalButtonProps) => {
export const MinimalTools = () => { export const MinimalTools = () => {
const status = useSelector(statusSelector); const status = useSelector(statusSelector);
console.log(status);
if (status === Status.CreateOverlay || status === Status.EditOverlay) { if (status === Status.CreateOverlay || status === Status.EditOverlay) {
return ( return (
<> <>

1
src/map/MapEditor.ts

@ -317,6 +317,7 @@ export class MapEditor extends Emitter implements IMapEditor {
} }
_onOverlayDragEnd(id: string) { _onOverlayDragEnd(id: string) {
if (this.editorStatus === "editing") return;
this._updateOverlay(id); this._updateOverlay(id);
} }

Loading…
Cancel
Save