Fix bug with concurrent token updates
This commit is contained in:
parent
3c204377d6
commit
96efcfd5de
@ -19,7 +19,7 @@ function ProxyToken({ tokenClassName, onProxyDragEnd }) {
|
|||||||
const proxyOnMap = useRef(false);
|
const proxyOnMap = useRef(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const tokenInteract = interact(`.${tokenClassName}`).draggable({
|
interact(`.${tokenClassName}`).draggable({
|
||||||
listeners: {
|
listeners: {
|
||||||
start: (event) => {
|
start: (event) => {
|
||||||
let target = event.target;
|
let target = event.target;
|
||||||
@ -110,9 +110,6 @@ function ProxyToken({ tokenClassName, onProxyDragEnd }) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
return () => {
|
|
||||||
tokenInteract.unset();
|
|
||||||
};
|
|
||||||
}, [onProxyDragEnd, tokenClassName, proxyContainer]);
|
}, [onProxyDragEnd, tokenClassName, proxyContainer]);
|
||||||
|
|
||||||
if (!imageSource) {
|
if (!imageSource) {
|
||||||
|
Loading…
Reference in New Issue
Block a user