@servantcdh/ez-planet-labeling 0.5.30 → 0.5.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +18 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3589,7 +3589,7 @@ const LIB_AUTHOR = "최동호";
|
|
|
3589
3589
|
const LIB_CONTACT = "servantcdh@naver.com";
|
|
3590
3590
|
const __EZ_PLANET_META__ = Object.freeze({
|
|
3591
3591
|
name: LIB_NAME,
|
|
3592
|
-
version: "0.5.
|
|
3592
|
+
version: "0.5.31",
|
|
3593
3593
|
author: LIB_AUTHOR,
|
|
3594
3594
|
contact: LIB_CONTACT,
|
|
3595
3595
|
license: "Proprietary — See LICENSE"
|
|
@@ -18622,13 +18622,16 @@ const useImageLabelingUIMeta = ({
|
|
|
18622
18622
|
}
|
|
18623
18623
|
const baseItems = [
|
|
18624
18624
|
{
|
|
18625
|
-
variant: "
|
|
18625
|
+
variant: "radio",
|
|
18626
|
+
id: "sub-magic-wand",
|
|
18627
|
+
name: "subTool",
|
|
18626
18628
|
iconType: subToolIconMap["magic-wand"],
|
|
18627
18629
|
tooltip: formatShortcutTitle(
|
|
18628
18630
|
"Magic Brush",
|
|
18629
18631
|
LABELING_SHORTCUTS.image.magicBrush
|
|
18630
18632
|
),
|
|
18631
18633
|
disabled: false,
|
|
18634
|
+
checked: (tool == null ? void 0 : tool.id) === "magic-wand",
|
|
18632
18635
|
onClick: () => {
|
|
18633
18636
|
setTool(magicbrushTool());
|
|
18634
18637
|
setSelectedSubToolId("magic-wand");
|
|
@@ -18637,13 +18640,16 @@ const useImageLabelingUIMeta = ({
|
|
|
18637
18640
|
}
|
|
18638
18641
|
},
|
|
18639
18642
|
{
|
|
18640
|
-
variant: "
|
|
18643
|
+
variant: "radio",
|
|
18644
|
+
id: "sub-superpixel",
|
|
18645
|
+
name: "subTool",
|
|
18641
18646
|
iconType: subToolIconMap.superpixel,
|
|
18642
18647
|
tooltip: formatShortcutTitle(
|
|
18643
18648
|
"Superpixel",
|
|
18644
18649
|
LABELING_SHORTCUTS.image.superpixel
|
|
18645
18650
|
),
|
|
18646
18651
|
disabled: false,
|
|
18652
|
+
checked: (tool == null ? void 0 : tool.id) === "superpixel",
|
|
18647
18653
|
onClick: () => {
|
|
18648
18654
|
setTool(superpixelTool());
|
|
18649
18655
|
setSelectedSubToolId("superpixel");
|
|
@@ -18655,12 +18661,12 @@ const useImageLabelingUIMeta = ({
|
|
|
18655
18661
|
if (extensionSubMenuItems.length > 0) {
|
|
18656
18662
|
const extItems = extensionSubMenuItems.map((ext) => ({
|
|
18657
18663
|
variant: "radio",
|
|
18658
|
-
id: `ext-${ext.id}`,
|
|
18659
|
-
name: "
|
|
18664
|
+
id: `sub-ext-${ext.id}`,
|
|
18665
|
+
name: "subTool",
|
|
18660
18666
|
iconType: ext.iconType,
|
|
18661
18667
|
tooltip: formatShortcutTitle(ext.name, ext.shortcut),
|
|
18662
|
-
checked: activePanelId === ext.id,
|
|
18663
18668
|
disabled: ext.disabled ?? false,
|
|
18669
|
+
checked: activePanelId === ext.id,
|
|
18664
18670
|
onClick: () => {
|
|
18665
18671
|
ext.onClick();
|
|
18666
18672
|
setLastSelectedType("extension");
|
|
@@ -18703,8 +18709,11 @@ const useImageLabelingUIMeta = ({
|
|
|
18703
18709
|
setSelectedSubToolId(tool == null ? void 0 : tool.id);
|
|
18704
18710
|
setLastSelectedType("subTool");
|
|
18705
18711
|
}
|
|
18706
|
-
if (tool &&
|
|
18707
|
-
useExtensionFloatingPanelStore.getState()
|
|
18712
|
+
if (tool && ["magic-wand", "superpixel"].includes(tool.id)) {
|
|
18713
|
+
const panelStore = useExtensionFloatingPanelStore.getState();
|
|
18714
|
+
if (panelStore.activePanelId) {
|
|
18715
|
+
panelStore.closePanel();
|
|
18716
|
+
}
|
|
18708
18717
|
}
|
|
18709
18718
|
setIsActiveSubToolPanel(false);
|
|
18710
18719
|
}, [tool, setSelectedSubToolId]);
|
|
@@ -18804,6 +18813,7 @@ const useImageLabelingUIMeta = ({
|
|
|
18804
18813
|
(e) => e.id === lastSelectedExtension.id
|
|
18805
18814
|
);
|
|
18806
18815
|
if (ext) ext.onClick();
|
|
18816
|
+
setIsActiveSubToolPanel(false);
|
|
18807
18817
|
}
|
|
18808
18818
|
} : {
|
|
18809
18819
|
variant: "radio",
|