@inweb/viewer-visualize 27.1.7 → 27.1.9

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.
@@ -17433,8 +17433,18 @@ js: import "konva/skia-backend";
17433
17433
  getSelectedObjects() {
17434
17434
  if (!this._konvaTransformer)
17435
17435
  return [];
17436
- return this._konvaTransformer
17437
- .nodes()
17436
+ const validNodes = this._konvaTransformer.nodes().filter((ref) => {
17437
+ try {
17438
+ return ref.getLayer() !== null && ref.getParent() !== null;
17439
+ }
17440
+ catch {
17441
+ return false;
17442
+ }
17443
+ });
17444
+ if (validNodes.length !== this._konvaTransformer.nodes().length) {
17445
+ this._konvaTransformer.nodes(validNodes);
17446
+ }
17447
+ return validNodes
17438
17448
  .map((ref) => {
17439
17449
  const name = ref.className;
17440
17450
  const konvaShape = Object.values(MarkupMode2Konva).find((shape) => shape.name === name);