@@ -35,17 +35,20 @@ describe('Minimap Testing', () => {
|
||||
});
|
||||
|
||||
it('changes node position', () => {
|
||||
const xPosBeforeDrag = Cypress.$('.react-flow__minimap-node:first').attr('x');
|
||||
const yPosBeforeDrag = Cypress.$('.react-flow__minimap-node:first').attr('y');
|
||||
const minimapNode = Cypress.$('.react-flow__minimap-node:first');
|
||||
|
||||
const xPosBeforeDrag = Number(minimapNode.attr('x'));
|
||||
const yPosBeforeDrag = Number(minimapNode.attr('y'));
|
||||
|
||||
cy.drag('.react-flow__node:first', { x: 500, y: 25 })
|
||||
.wait(100)
|
||||
.then(() => {
|
||||
const xPosAfterDrag = Cypress.$('.react-flow__minimap-node:first').attr('x');
|
||||
const yPosAfterDrag = Cypress.$('.react-flow__minimap-node:first').attr('y');
|
||||
const xPosAfterDrag = Number(minimapNode.attr('x'));
|
||||
const yPosAfterDrag = Number(minimapNode.attr('y'));
|
||||
|
||||
expect(xPosBeforeDrag).to.not.equal(xPosAfterDrag);
|
||||
expect(yPosBeforeDrag).to.not.equal(yPosAfterDrag);
|
||||
expect(xPosAfterDrag).not.to.equal(xPosBeforeDrag);
|
||||
expect(yPosAfterDrag).not.to.equal(yPosBeforeDrag);
|
||||
expect(xPosAfterDrag - xPosBeforeDrag).to.be.greaterThan(yPosAfterDrag - yPosBeforeDrag);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@reactflow/examples",
|
||||
"private": true,
|
||||
"version": "0.0.1",
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --port 3000 --open",
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# @reactflow/minimap
|
||||
|
||||
## 11.2.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [`7ece618d`](https://github.com/wbkd/react-flow/commit/7ece618d94b76183c1ecd45b16f6ab168168351b) Thanks [@](https://github.com/lounsbrough)! - Fix minimap node position
|
||||
|
||||
## 11.2.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@reactflow/minimap",
|
||||
"version": "11.2.1",
|
||||
"version": "11.2.2",
|
||||
"description": "Minimap component for React Flow.",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
||||
@@ -173,7 +173,7 @@ function MiniMap({
|
||||
<MiniMapNode
|
||||
key={node.id}
|
||||
x={positionAbsolute.x}
|
||||
y={positionAbsolute.x}
|
||||
y={positionAbsolute.y}
|
||||
width={node.width!}
|
||||
height={node.height!}
|
||||
style={node.style}
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# reactflow
|
||||
|
||||
## 11.3.2
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- [`7ece618d`](https://github.com/wbkd/react-flow/commit/7ece618d94b76183c1ecd45b16f6ab168168351b) Thanks [@](https://github.com/lounsbrough)! - Fix minimap node position
|
||||
|
||||
- Updated dependencies [[`7ece618d`](https://github.com/wbkd/react-flow/commit/7ece618d94b76183c1ecd45b16f6ab168168351b)]:
|
||||
- @reactflow/minimap@11.2.2
|
||||
|
||||
## 11.3.1
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "reactflow",
|
||||
"version": "11.3.1",
|
||||
"version": "11.3.2",
|
||||
"description": "A highly customizable React library for building node-based editors and interactive flow charts",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
||||
Reference in New Issue
Block a user