Skip to content

Commit 97afd1b

Browse files
Merge pull request #3413 from quadratichq/fix-column-row-selection
Fix column row selection
2 parents 0a04880 + fdf12b2 commit 97afd1b

File tree

13 files changed

+33
-33
lines changed

13 files changed

+33
-33
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ edition = "2024"
1515
description = "Infinite data grid with Python, JavaScript, and SQL built-in"
1616
repository = "https://github.com/quadratichq/quadratic"
1717
license-file = "LICENSE"
18-
version = "0.17.1"
18+
version = "0.17.2"
1919

2020

2121
[profile.release]

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.17.1
1+
0.17.2

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "quadratic",
3-
"version": "0.17.1",
3+
"version": "0.17.2",
44
"author": {
55
"name": "David Kircos",
66
"email": "david@quadratichq.com",

quadratic-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "quadratic-api",
3-
"version": "0.17.1",
3+
"version": "0.17.2",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

quadratic-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "quadratic-client",
3-
"version": "0.17.1",
3+
"version": "0.17.2",
44
"author": {
55
"name": "David Kircos",
66
"email": "david@quadratichq.com",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "0.17.1"
2+
"version": "0.17.2"
33
}

quadratic-client/src/app/gridGL/interaction/pointer/PointerHeading.ts

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -166,28 +166,28 @@ export class PointerHeading {
166166
}
167167
}, DOUBLE_CLICK_TIME);
168168
}
169+
}
169170

170-
// Selects multiple columns or rows. If ctrl/meta is pressed w/o shift,
171-
// then it add or removes the clicked column or row. If shift is pressed,
172-
// then it selects all columns or rows between the last clicked column or
173-
// row and the current one.
174-
const bounds = pixiApp.viewport.getVisibleBounds();
175-
const headingSize = pixiApp.headings.headingSize;
176-
if (intersects.column !== null) {
177-
const top = sheets.sheet.getRowFromScreen(bounds.top + headingSize.height);
178-
cursor.selectColumn(intersects.column, e.ctrlKey || e.metaKey, e.shiftKey, isRightClick, top);
179-
} else if (intersects.row !== null) {
180-
const left = sheets.sheet.getColumnFromScreen(bounds.left);
181-
cursor.selectRow(intersects.row, e.ctrlKey || e.metaKey, e.shiftKey, isRightClick, left);
182-
}
183-
if (isRightClick) {
184-
events.emit('contextMenu', {
185-
world,
186-
column: intersects.column ?? undefined,
187-
row: intersects.row ?? undefined,
188-
type: ContextMenuType.Grid,
189-
});
190-
}
171+
// Selects multiple columns or rows. If ctrl/meta is pressed w/o shift,
172+
// then it add or removes the clicked column or row. If shift is pressed,
173+
// then it selects all columns or rows between the last clicked column or
174+
// row and the current one.
175+
const bounds = pixiApp.viewport.getVisibleBounds();
176+
const headingSize = pixiApp.headings.headingSize;
177+
if (intersects.column !== null) {
178+
const top = sheets.sheet.getRowFromScreen(bounds.top + headingSize.height);
179+
cursor.selectColumn(intersects.column, e.ctrlKey || e.metaKey, e.shiftKey, isRightClick, top);
180+
} else if (intersects.row !== null) {
181+
const left = sheets.sheet.getColumnFromScreen(bounds.left);
182+
cursor.selectRow(intersects.row, e.ctrlKey || e.metaKey, e.shiftKey, isRightClick, left);
183+
}
184+
if (isRightClick) {
185+
events.emit('contextMenu', {
186+
world,
187+
column: intersects.column ?? undefined,
188+
row: intersects.row ?? undefined,
189+
type: ContextMenuType.Grid,
190+
});
191191
}
192192

193193
return true;

quadratic-connection/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "quadratic-connection"
3-
version = "0.17.1"
3+
version = "0.17.2"
44
edition = "2024"
55
authors = ["David DiMaria <david.dimaria@quadratichq.com>"]
66

quadratic-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "quadratic-core"
3-
version = "0.17.1"
3+
version = "0.17.2"
44
authors = ["Andrew Farkas <andrew.farkas@quadratic.to>"]
55
edition = "2024"
66
description = "Infinite data grid with Python, JavaScript, and SQL built-in"

quadratic-files/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "quadratic-files"
3-
version = "0.17.1"
3+
version = "0.17.2"
44
edition = "2024"
55
authors = ["David DiMaria <david.dimaria@quadratichq.com>"]
66

0 commit comments

Comments
 (0)