Remove unused member in proxy token
This commit is contained in:
parent
daab80f45e
commit
07a5d95e4c
@ -24,7 +24,6 @@ function ProxyToken({ tokenClassName, onProxyDragEnd, tokens }) {
|
|||||||
const proxyContainer = usePortal("root");
|
const proxyContainer = usePortal("root");
|
||||||
|
|
||||||
const [imageSource, setImageSource] = useState("");
|
const [imageSource, setImageSource] = useState("");
|
||||||
const [tokenId, setTokenId] = useState(null);
|
|
||||||
const proxyRef = useRef();
|
const proxyRef = useRef();
|
||||||
|
|
||||||
// Store the tokens in a ref and access in the interactjs loop
|
// Store the tokens in a ref and access in the interactjs loop
|
||||||
@ -42,12 +41,10 @@ function ProxyToken({ tokenClassName, onProxyDragEnd, tokens }) {
|
|||||||
listeners: {
|
listeners: {
|
||||||
start: (event) => {
|
start: (event) => {
|
||||||
let target = event.target;
|
let target = event.target;
|
||||||
const id = target.dataset.id;
|
|
||||||
|
|
||||||
// Hide the token and copy it's image to the proxy
|
// Hide the token and copy it's image to the proxy
|
||||||
target.parentElement.style.opacity = "0.25";
|
target.parentElement.style.opacity = "0.25";
|
||||||
setImageSource(target.src);
|
setImageSource(target.src);
|
||||||
setTokenId(id);
|
|
||||||
|
|
||||||
let proxy = proxyRef.current;
|
let proxy = proxyRef.current;
|
||||||
if (proxy) {
|
if (proxy) {
|
||||||
|
Loading…
Reference in New Issue
Block a user