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 12, 2024
1 parent 9b84ee1 commit a1b1abe
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 @@ -38,6 +38,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
Konva.dragButtons = [0, 2];
// prevent context menu on right click
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 a1b1abe

Please sign in to comment.