@servantcdh/ez-planet-labeling 1.0.16 → 1.0.17

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -5
  2. 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: "1.0.16",
3592
+ version: "1.0.17",
3593
3593
  author: LIB_AUTHOR,
3594
3594
  contact: LIB_CONTACT,
3595
3595
  license: "Proprietary — See LICENSE"
@@ -6401,6 +6401,10 @@ const MagicBrush = {
6401
6401
  traceContours,
6402
6402
  simplifyContours
6403
6403
  };
6404
+ const useLabelingCanvasObjectsStore = create((set) => ({
6405
+ objects: [],
6406
+ setObjects: (objects2) => set({ objects: objects2 })
6407
+ }));
6404
6408
  const lastMousePosition = getLastMousePosition();
6405
6409
  const createBrushCursor = (brush, colorCode) => {
6406
6410
  const activeCanvas = ensureCanvas();
@@ -6484,6 +6488,8 @@ const getRectInit = ({ colorCode, callback }, isBlank, isSegmentAnything = false
6484
6488
  isBlank = isSegmentAnything;
6485
6489
  activeCanvas.getObjects().forEach((object) => object.set({ visible: false }));
6486
6490
  activeCanvas.renderAll();
6491
+ const hiddenObjects = getLabeledObjects(activeCanvas);
6492
+ useLabelingCanvasObjectsStore.getState().setObjects([...hiddenObjects]);
6487
6493
  }
6488
6494
  let lastPointX = 0;
6489
6495
  let lastPointY = 0;
@@ -6601,6 +6607,8 @@ const getRectInit = ({ colorCode, callback }, isBlank, isSegmentAnything = false
6601
6607
  getLabeledObjects(activeCanvas).forEach(
6602
6608
  (object) => object.set({ visible: true })
6603
6609
  );
6610
+ const objects2 = getLabeledObjects(activeCanvas);
6611
+ useLabelingCanvasObjectsStore.getState().setObjects([...objects2]);
6604
6612
  }
6605
6613
  if (hasContext()) {
6606
6614
  activeCanvas.renderAll();
@@ -20030,10 +20038,6 @@ const useSuperPixelConfigStore = create(
20030
20038
  }
20031
20039
  })
20032
20040
  );
20033
- const useLabelingCanvasObjectsStore = create((set) => ({
20034
- objects: [],
20035
- setObjects: (objects2) => set({ objects: objects2 })
20036
- }));
20037
20041
  const DEFAULT_RECT_STROKE = "#FF3B30";
20038
20042
  const isBoxValue = (value, inferenceType) => {
20039
20043
  if (inferenceType !== "OBJECT_DETECTION") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servantcdh/ez-planet-labeling",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",