Skip to content

Commit 8063da3

Browse files
chore: Upgrade to TestBench 10.0.0-alpha4, license-checker 2.0.0-alpha3 (#7876)
* chore: Upgrade to TestBench 10.0.0-alpha4 * chore: Upgrade to LicenseChecker to 2.0.0-alpha3 (#7877) --------- Co-authored-by: Serhii Kulykov <[email protected]>
1 parent 6e7cadb commit 8063da3

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
</scm>
7070
<properties>
7171
<flow.version>25.0-SNAPSHOT</flow.version>
72-
<testbench.version>10.0.0-alpha3</testbench.version>
72+
<testbench.version>10.0.0-alpha4</testbench.version>
7373
<maven.compiler.source>17</maven.compiler.source>
7474
<maven.compiler.target>17</maven.compiler.target>
7575
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

vaadin-spreadsheet-flow-parent/vaadin-spreadsheet-flow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<dependency>
3131
<groupId>com.vaadin</groupId>
3232
<artifactId>license-checker</artifactId>
33-
<version>2.0.0-alpha2</version>
33+
<version>2.0.0-alpha3</version>
3434
<scope>provided</scope>
3535
</dependency>
3636
<dependency>

vaadin-spreadsheet-flow-parent/vaadin-spreadsheet-testbench/src/main/java/com/vaadin/flow/component/spreadsheet/testbench/SpreadsheetElement.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,10 @@ private void scrollSheetVisible(WebElement targetSheet) {
293293
boolean isElementSelected(WebElement element) {
294294
updateSelectionLocationAndSize();
295295
Point location = element.getLocation();
296-
location.x += element.getSize().getWidth() / 2;
297-
location.y += element.getSize().getHeight() / 2;
298-
return isInSelection(location) || isNonCoherentlySelected(element);
296+
int centerX = location.x + element.getSize().getWidth() / 2;
297+
int centerY = location.y + element.getSize().getHeight() / 2;
298+
return isInSelection(centerX, centerY)
299+
|| isNonCoherentlySelected(element);
299300
}
300301

301302
private void findSelectionOutline() {
@@ -330,15 +331,14 @@ private void updateSelectionLocationAndSize() {
330331
bottomY + bottomH - sLocation.getY());
331332
}
332333

333-
private boolean isInSelection(Point location) {
334+
private boolean isInSelection(int locationX, int locationY) {
334335
// Test top left corner
335-
if (location.getX() < sLocation.getX()
336-
|| location.getY() < sLocation.getY()) {
336+
if (locationX < sLocation.getX() || locationY < sLocation.getY()) {
337337
return false;
338338
}
339339
// Test lower right corner
340-
if (location.getX() - sLocation.getX() > sSize.getWidth()
341-
|| location.getY() - sLocation.getY() > sSize.getHeight()) {
340+
if (locationX - sLocation.getX() > sSize.getWidth()
341+
|| locationY - sLocation.getY() > sSize.getHeight()) {
342342
return false;
343343
}
344344
// Everything is inside the selection

0 commit comments

Comments
 (0)