#
luxiaotao1123
2024-10-14 c4ffccd2536be747500e6ac7800200284dc7220f
zy-acs-flow/src/map/MapPage.jsx
@@ -136,7 +136,7 @@
                player.hideStarryBackground();
                player.activateMapMultiSelect((selectedSprites, restartFn) => {
                    console.log(selectedSprites);
                    setBatchSprites(selectedSprites);
                });
                break
@@ -159,7 +159,7 @@
                player.showStarryBackground(); // 0x2f68ac
                player.activateMapMultiSelect((selectedSprites, restartFn) => {
                    console.log(selectedSprites);
                    setBatchSprites(selectedSprites);
                });
                mapContainer.children.forEach(child => {
@@ -205,6 +205,19 @@
        }
    }, [spriteSettings, mapContainer])
    const prevSpriteSettings = prevSpriteSettingsRef.current;
    // watch batchSprites
    React.useEffect(() => {
        if (!mapContainer) {
            return;
        }
        if (batchSprites?.length > 0) {
            setBatchSelectionVisible(true)
        } else {
            player.clearSelectedSprites();
            setBatchSelectionVisible(false)
        }
    }, [batchSprites])
    const actions = [
        { icon: <FileCopyIcon />, name: '复制' },
@@ -430,6 +443,7 @@
                onCancel={() => {
                    setBatchSelectionVisible(false);
                }}
                width={570}
            />
        </Box>