Skip to content

Commit

Permalink
feat(stage): allow right mouse button to move stage
Browse files Browse the repository at this point in the history
Closes #22

Signed-off-by: Lukas Mertens <git@lukas-mertens.de>

commit-id:c32b4c20
  • Loading branch information
lukas-mertens committed Mar 11, 2024
1 parent e5aec96 commit 768ce89
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/modules/evconf_konva/config_stage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ export default class ConfigStage {
constructor(private config: StageConfig, context: ConfigStageContext) {
this._stage = new Konva.Stage(config);

// allow drag with left and right mouse button

Check failure on line 40 in src/modules/evconf_konva/config_stage.ts

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/modules/evconf_konva/config_stage.ts#L40

Unsafe member access .Text on an `any` value.
Konva.dragButtons = [0, 2];
// prevent context menu on right click

Check failure on line 42 in src/modules/evconf_konva/config_stage.ts

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/modules/evconf_konva/config_stage.ts#L42

Unsafe assignment of an `any` value.
this._stage.on("contextmenu", (e: KonvaEventObject<MouseEvent>) => e.evt.preventDefault());

const tooltipLayer = new Konva.Layer({});

const tooltip = new Konva.Text({
Expand Down

0 comments on commit 768ce89

Please sign in to comment.