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