Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 4 additions & 38 deletions code/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- [#291](https://github.com/InditexTech/weavejs/issues/291) Group of elements moving not maintaining position (all layers)

## [0.19.0] - 2025-05-28

### Added
Expand Down Expand Up @@ -337,79 +341,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#18](https://github.com/InditexTech/weavejs/issues/18) Fix awareness not working on store-azure-web-pubsub

[Unreleased]: https://github.com/InditexTech/weavejs/compare/0.19.0...HEAD

[0.19.0]: https://github.com/InditexTech/weavejs/compare/0.18.0...0.19.0

[0.18.0]: https://github.com/InditexTech/weavejs/compare/0.17.0...0.18.0

[0.17.0]: https://github.com/InditexTech/weavejs/compare/0.16.2...0.17.0

[0.16.2]: https://github.com/InditexTech/weavejs/compare/0.16.1...0.16.2

[0.16.1]: https://github.com/InditexTech/weavejs/compare/0.16.0...0.16.1

[0.16.0]: https://github.com/InditexTech/weavejs/compare/0.15.0...0.16.0

[0.15.0]: https://github.com/InditexTech/weavejs/compare/0.14.3...0.15.0

[0.14.3]: https://github.com/InditexTech/weavejs/compare/0.14.2...0.14.3

[0.14.2]: https://github.com/InditexTech/weavejs/compare/0.14.1...0.14.2

[0.14.1]: https://github.com/InditexTech/weavejs/compare/0.14.0...0.14.1

[0.14.0]: https://github.com/InditexTech/weavejs/compare/0.13.1...0.14.0

[0.13.1]: https://github.com/InditexTech/weavejs/compare/0.13.0...0.13.1

[0.13.0]: https://github.com/InditexTech/weavejs/compare/0.12.1...0.13.0

[0.12.1]: https://github.com/InditexTech/weavejs/compare/0.12.0...0.12.1

[0.12.0]: https://github.com/InditexTech/weavejs/compare/0.11.0...0.12.0

[0.11.0]: https://github.com/InditexTech/weavejs/compare/0.10.3...0.11.0

[0.10.3]: https://github.com/InditexTech/weavejs/compare/0.10.2...0.10.3

[0.10.2]: https://github.com/InditexTech/weavejs/compare/0.10.1...0.10.2

[0.10.1]: https://github.com/InditexTech/weavejs/compare/0.10.0...0.10.1

[0.10.0]: https://github.com/InditexTech/weavejs/compare/0.9.3...0.10.0

[0.9.3]: https://github.com/InditexTech/weavejs/compare/0.9.2...0.9.3

[0.9.2]: https://github.com/InditexTech/weavejs/compare/0.9.1...0.9.2

[0.9.1]: https://github.com/InditexTech/weavejs/compare/0.9.0...0.9.1

[0.9.0]: https://github.com/InditexTech/weavejs/compare/0.8.0...0.9.0

[0.8.0]: https://github.com/InditexTech/weavejs/compare/0.7.1...0.8.0

[0.7.1]: https://github.com/InditexTech/weavejs/compare/0.7.0...0.7.1

[0.7.0]: https://github.com/InditexTech/weavejs/compare/0.6.0...0.7.0

[0.6.0]: https://github.com/InditexTech/weavejs/compare/0.5.0...0.6.0

[0.5.0]: https://github.com/InditexTech/weavejs/compare/0.4.0...0.5.0

[0.4.0]: https://github.com/InditexTech/weavejs/compare/0.3.3...0.4.0

[0.3.3]: https://github.com/InditexTech/weavejs/compare/0.3.2...0.3.3

[0.3.2]: https://github.com/InditexTech/weavejs/compare/0.3.1...0.3.2

[0.3.1]: https://github.com/InditexTech/weavejs/compare/0.3.0...0.3.1

[0.3.0]: https://github.com/InditexTech/weavejs/compare/0.2.1...0.3.0

[0.2.1]: https://github.com/InditexTech/weavejs/compare/0.2.0...0.2.1

[0.2.0]: https://github.com/InditexTech/weavejs/compare/0.1.1...0.2.0

[0.1.1]: https://github.com/InditexTech/weavejs/compare/0.1.0...0.1.1

[0.1.0]: https://github.com/InditexTech/weavejs/releases/tag/0.1.0
19 changes: 19 additions & 0 deletions code/packages/sdk/src/plugins/nodes-selection/nodes-selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
type WeaveSelection,
type NodeSerializable,
WEAVE_NODE_CUSTOM_EVENTS,
type WeaveElementInstance,
} from '@inditextech/weave-types';
import Konva from 'konva';
import { WeavePlugin } from '@/plugins/plugin';
Expand Down Expand Up @@ -170,19 +171,37 @@ export class WeaveNodesSelectionPlugin extends WeavePlugin {
bubbles: true,
});
}

for (const node of tr.nodes()) {
const nodeHandler = this.instance.getNodeHandler<WeaveNode>(
node.getAttrs().nodeType
);
this.instance.updateNode(
nodeHandler.serialize(node as WeaveElementInstance)
);
}
}
});

tr.on('dragend', () => {
if (this.isSelecting() && tr.nodes().length > 1) {
clearContainerTargets(this.instance);

console.log('tr.nodes()', tr.nodes());

for (const node of tr.nodes()) {
const layerToMove = moveNodeToContainer(this.instance, node);

if (layerToMove) {
continue;
}

const nodeHandler = this.instance.getNodeHandler<WeaveNode>(
node.getAttrs().nodeType
);
this.instance.updateNode(
nodeHandler.serialize(node as WeaveElementInstance)
);
}
}
});
Expand Down
1 change: 1 addition & 0 deletions docs/content/docs/main/changelog/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ description: Check out the latest changes to Weave.js.

## Pre-release versions

- [**0.20.0**](/docs/main/changelog/prerelease/0.20.0)
- [**0.19.0**](/docs/main/changelog/prerelease/0.19.0)
- [**0.18.0**](/docs/main/changelog/prerelease/0.18.0)
- [**0.17.0**](/docs/main/changelog/prerelease/0.17.0)
Expand Down
12 changes: 12 additions & 0 deletions docs/content/docs/main/changelog/prerelease/0.20.0.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: v0.20.0
description: Selection & grouping bugfixes
---

## Metadata

- **Release date**: 2025-05-29

### Fixed

- [#291](https://github.com/InditexTech/weavejs/issues/291) Group of elements moving not maintaining position (all layers)
1 change: 1 addition & 0 deletions docs/content/docs/main/changelog/prerelease/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"title": "Prerelease versions",
"description": "Detailed changelog for Weave.js pre-release versions",
"pages": [
"0.20.0",
"0.19.0",
"0.18.0",
"0.17.0",
Expand Down