Skip to content

Commit 5dd2b86

Browse files
authored
Merge pull request #365 from Dessia-tech/dev
v0.24.0
2 parents f10c6d9 + 17a95d9 commit 5dd2b86

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+898
-406
lines changed

CHANGELOG.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.23.0]
8+
## [0.24.0]
9+
### Add
10+
- Allow to directly specify if axes are on or off in Python
911

12+
### Fix
13+
- LineSegment2D : If it is overloaded, MPL Plot now show the right edge_style instead of generating of random one
14+
- Arc2D: mpl_plot
15+
16+
## [0.23.0]
1017
### Feat
1118
- Add events (Subject) to emit shape hovering and clicking
1219
- Highlight shapes when corresponding function is called from wrapper software
@@ -16,6 +23,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1623

1724
### Refactor
1825
- Implements InteractiveObject for handling all mouse objects in one class
26+
## [0.22.5]
27+
### Fix
28+
- Fix global bug on RemoteFigure.resize methods, fixing a browser crasher bug
29+
30+
## [0.22.4]
31+
### Fix
32+
- Fix bug on tooltip origin when mouse leaving while hovering a shape
33+
- Remove unused code
34+
- Fix html for prettier to work
35+
- Remove name from add plot feature
36+
37+
## [0.22.2]
38+
### Fix
39+
- Local import
40+
- Add tooltip on any shape with Python with Shape object
1941

2042
## [0.22.0]
2143
### Add

code_pylint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
'trailing-whitespace': 11,
3636
'empty-docstring': 7,
3737
'missing-module-docstring': 4,
38-
'too-many-arguments': 20,
38+
'too-many-arguments': 24,
3939
'too-few-public-methods': 5,
4040
'unnecessary-comprehension': 5,
4141
'no-value-for-parameter': 2,

cypress/e2e/figures.cy.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ describe("Figure", function() {
3535
{ "name": "", "cx": 3, "cy": 3, "type_": "point" },
3636
{ "name": "", "cx": 8, "cy": 3, "type_": "point" },
3737
{ "name": "", "data": [66, 11.5, 73, 11.5], "point1": [66, 11.5], "point2": [73, 11.5], "type_": "linesegment2d" }
38-
]
38+
],
39+
"axis_on": true
3940
};
4041

4142
it('should create a new instance of Figure from multiplot data with valid arguments', function() {
@@ -209,7 +210,8 @@ describe("Histogram", function() {
209210
{ "name": "", "values": { "x": 3, "y": 2 }, "x": 3, "y": 2 },
210211
{ "name": "", "values": { "x": 4, "y": 3 }, "x": 4, "y": 3 }
211212
],
212-
"type_": "histogram"
213+
"type_": "histogram",
214+
"axis_on": true
213215
};
214216
const histogram = new Histogram(data, canvas.width, canvas.height, 0, 0, canvasID, false);
215217
histogram.setCanvas(canvas.id);
@@ -270,7 +272,8 @@ describe("Scatter", function() {
270272
{ "name": "", "values": { "x": 3, "y": 2 }, "x": 3, "y": 2 },
271273
{ "name": "", "values": { "x": 4, "y": 3 }, "x": 4, "y": 3 }
272274
],
273-
"type_": "scatterplot"
275+
"type_": "scatterplot",
276+
"axis_on": true
274277
}
275278
const scatter = new Scatter(data, canvas.width, canvas.height, 0, 0, canvasID, false);
276279
const frameMatrix = new DOMMatrix([
@@ -334,7 +337,8 @@ describe("Graph2D", function() {
334337
]
335338
},
336339
],
337-
"type_": "graph2d"
340+
"type_": "graph2d",
341+
"axis_on": true
338342
}
339343
const graph = new Graph2D(data, canvas.width, canvas.height, 0, 0, canvasID, false);
340344

@@ -366,7 +370,8 @@ describe("ParallelPlot", function() {
366370
{ "name": "", "values": { "x": 3, "y": 2, "z": 2 }, "x": 3, "y": 2, "z": 2 },
367371
{ "name": "", "values": { "x": 4, "y": 3, "z": 5 }, "x": 4, "y": 3, "z": 5 }
368372
],
369-
"type_": "parallelplot"
373+
"type_": "parallelplot",
374+
"axis_on": true
370375
}
371376
const parallelplot = new ParallelPlot(data, canvas.width, canvas.height, 0, 0, canvasID, false);
372377
parallelplot.setCanvas(canvas.id);

cypress/e2e/remoteFigure.cy.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ describe("RemoteFigure.resizeUpdate", function() {
147147
});
148148
});
149149

150+
describe("RemoteFigure.resizeWindow", function() {
151+
it("should resize figure with new window size", function() {
152+
const figure = new RemoteFigure(data, canvas.width, canvas.height, 100, 100, canvas.id);
153+
figure.setCanvas(canvas.id);
154+
figure.resizeWindow(700, 500);
155+
expect(figure.size.x, "size.x").to.be.equal(700);
156+
expect(figure.size.y, "size.y").to.be.equal(500);
157+
});
158+
});
159+
150160
describe("RemoteFigure.reset", function() {
151161
it("should reset scales and selectors", function() {
152162
const figure = new RemoteFigure(data, canvas.width, canvas.height, 100, 100, canvas.id);

cypress/e2e/visualRegressions.cy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const FIGURES_DATA = [
1515
{ name: "parallelplot", data: parallelPlotData, threshold: 0.05 },
1616
{ name: "plotscatter", data: plotScatterData, threshold: 0.05 },
1717
{ name: "primitivegroupcontainer", data: primitiveGroupContainerData, threshold: 0.05 },
18-
{ name: "scattermatrix", data: scattermatrixData, threshold: 0.07 },
18+
{ name: "scattermatrix", data: scattermatrixData, threshold: 0.08 },
1919
{ name: "simpleshapes", data: simpleshapesData, threshold: 0.05 },
2020
{ name: "textscaling", data: textscalingData, threshold: 0.05 },
2121
{ name: "multiplot", data: multiplotData, threshold: 0.05 }
@@ -77,11 +77,11 @@ FIGURES_DATA.forEach(figureData => {
7777
it("should hover line even if mouse is not exactly on line", function () {
7878
cy.window().then((win) => {
7979
const draw = win.eval('plot_data');
80-
let [canvasMouse, frameMouse, mouseCoords] = draw.projectMouse({"offsetX": 814, "offsetY": 196} as MouseEvent);
80+
let [canvasMouse, frameMouse, mouseCoords] = draw.projectMouse({"offsetX": 809, "offsetY": 196} as MouseEvent);
8181
draw.castMouseMove(canvasMouse, frameMouse, mouseCoords);
8282
expect(draw.relativeObjects.shapes[23].isHovered).to.be.true;
8383

84-
[canvasMouse, frameMouse, mouseCoords] = draw.projectMouse({"offsetX": 822, "offsetY": 196} as MouseEvent);
84+
[canvasMouse, frameMouse, mouseCoords] = draw.projectMouse({"offsetX": 816, "offsetY": 196} as MouseEvent);
8585
draw.castMouseMove(canvasMouse, frameMouse, mouseCoords);
8686
expect(draw.relativeObjects.shapes[23].isHovered).to.be.true;
8787
});
Loading
Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 2 additions & 2 deletions
Loading
Loading
Lines changed: 2 additions & 2 deletions
Loading

0 commit comments

Comments
 (0)