Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion scripts/panZoomManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const PanZoomManager = {
let lastPos = { x: 0, y: 0 };

stage.on("mousedown", (e) => {
if (e.evt.button === 1) { // Middle click
if (e.evt.button === 1 || (e.evt.button === 0 && e.evt.shiftKey)) { // Middle click or shift + left click
PanZoomManager.isPanning = true;
lastPos = stage.getPointerPosition();
e.evt.preventDefault();
Expand Down
4 changes: 4 additions & 0 deletions scripts/selectionManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ const SelectionManager = {
stage.on('mousedown', (e) => {
// Only left mouse button for selection
if (e.evt.button !== 0) return;

// Disable selection if shift key is pressed
// since shift + LMB is used for panning
if (e.evt.shiftKey) return;

// Don't start selection if clicking on an image or transformer
if (e.target !== stage && e.target.name() !== 'bgRect') return;
Expand Down