Skip to content

Commit

Permalink
fix: remove Click + CTRL for adding to selection
Browse files Browse the repository at this point in the history
Closes #849
  • Loading branch information
philippfromme committed Jan 22, 2024
1 parent 0ec3bb3 commit adb1fc0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 36 deletions.
4 changes: 2 additions & 2 deletions lib/features/selection/SelectionBehavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ export default function SelectionBehavior(eventBus, selection, canvas, elementRe
var isSelected = selection.isSelected(element),
isMultiSelect = selection.get().length > 1;

// Add to selection if CTRL or SHIFT pressed
var add = hasPrimaryModifier(event) || hasSecondaryModifier(event);
// Add to selection if SHIFT pressed
var add = hasSecondaryModifier(event);

if (isSelected && isMultiSelect) {
if (add) {
Expand Down
34 changes: 0 additions & 34 deletions test/spec/features/selection/SelectionBehaviorSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,23 +363,6 @@ describe('features/selection/Selection', function() {
}));


it('should add element to selection on click + CTRL',
inject(function(eventBus, selection) {

// given
selection.select(shape1);

// when
eventBus.fire(clickEvent(shape2, keyModifier));

// then
expect(selection.get()).to.have.length(2);
expect(selection.isSelected(shape1)).to.be.true;
expect(selection.isSelected(shape2)).to.be.true;
})
);


it('should add element to selection on click + SHIFT',
inject(function(eventBus, selection) {

Expand All @@ -397,23 +380,6 @@ describe('features/selection/Selection', function() {
);


it('should remove selected element from selection on click + CTRL',
inject(function(eventBus, selection) {

// given
selection.select([ shape1, shape2 ]);

// when
eventBus.fire(clickEvent(shape1, keyModifier));

// then
expect(selection.get()).to.have.length(1);
expect(selection.isSelected(shape1)).to.be.false;
expect(selection.isSelected(shape2)).to.be.true;
})
);


it('should remove selected element from selection on click + SHIFT',
inject(function(eventBus, selection) {

Expand Down

0 comments on commit adb1fc0

Please sign in to comment.