Skip to content

Commit

Permalink
rm Canvas#interactive flag
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaMan123 committed Aug 3, 2023
1 parent 6791d74 commit 0d0ce13
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
7 changes: 0 additions & 7 deletions src/canvas/SelectableCanvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,6 @@ export class SelectableCanvas<EventSpec extends CanvasEvents = CanvasEvents>
declare centeredKey: TOptionalModifierKey;
declare altActionKey: TOptionalModifierKey;

/**
* Indicates that canvas is interactive. This property should not be changed.
* @type Boolean
* @default
*/
interactive = true;

declare selection: boolean;
declare selectionKey: TOptionalModifierKey | ModifierKey[];
declare altSelectionKey: TOptionalModifierKey;
Expand Down
1 change: 0 additions & 1 deletion src/shapes/Object/InteractiveObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,6 @@ export class InteractiveFabricObject<
drawSelectionBackground(ctx: CanvasRenderingContext2D): void {
if (
!this.selectionBackgroundColor ||
(this.canvas && !this.canvas.interactive) ||
(this.canvas && (this.canvas._activeObject as unknown as this) !== this)
) {
return;
Expand Down
5 changes: 0 additions & 5 deletions test/unit/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@
assert.equal(canvas.altActionKey, 'shiftKey', 'default is shift');
});

QUnit.test('interactive', function(assert) {
assert.ok(typeof canvas.interactive === 'boolean');
assert.ok(canvas.interactive, 'default is true');
});

QUnit.test('selection', function(assert) {
assert.ok(typeof canvas.selection === 'boolean');
assert.ok(canvas.selection, 'default is true');
Expand Down

0 comments on commit 0d0ce13

Please sign in to comment.