mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-28 12:36:41 +07:00
fixed marker dragging
This commit is contained in:
parent
3109f49cc4
commit
4e167c9759
8 changed files with 53 additions and 67 deletions
|
@ -21,12 +21,12 @@ class StickerDesc extends React.PureComponent<Props, State> {
|
|||
};
|
||||
|
||||
blockMouse = e => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
this.input.focus();
|
||||
};
|
||||
|
||||
input: HTMLTextAreaElement;
|
||||
// todo: pass here locker for moving markers from Sticker.js
|
||||
|
||||
render() {
|
||||
const { value: text } = this.props;
|
||||
|
@ -34,10 +34,10 @@ class StickerDesc extends React.PureComponent<Props, State> {
|
|||
return (
|
||||
<div
|
||||
className={classnames('sticker-desc', { is_empty: !text.trim() })}
|
||||
onMouseDown={this.blockMouse}
|
||||
onMouseUp={this.blockMouse}
|
||||
onDragStart={this.blockMouse}
|
||||
onTouchStart={this.blockMouse}
|
||||
onMouseDownCapture={this.blockMouse}
|
||||
onMouseUpCapture={this.blockMouse}
|
||||
onDragStartCapture={this.blockMouse}
|
||||
onTouchStartCapture={this.blockMouse}
|
||||
>
|
||||
<div className="sticker-desc-sizer">
|
||||
<span
|
||||
|
@ -59,4 +59,4 @@ class StickerDesc extends React.PureComponent<Props, State> {
|
|||
}
|
||||
}
|
||||
|
||||
export { StickerDesc };
|
||||
export { StickerDesc };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue