Fix bug with dropping token onto empty map
This commit is contained in:
parent
eed8f63b84
commit
ce11021e9f
@ -110,8 +110,8 @@ function ProxyToken({
|
||||
}
|
||||
let proxy = proxyRef.current;
|
||||
if (proxy) {
|
||||
if (onProxyDragEnd) {
|
||||
const mapImage = document.querySelector(".mapImage");
|
||||
if (onProxyDragEnd && mapImage) {
|
||||
const mapImageRect = mapImage.getBoundingClientRect();
|
||||
|
||||
let x = parseFloat(proxy.getAttribute("data-x")) || 0;
|
||||
|
Loading…
Reference in New Issue
Block a user