Skip to content

Commit

Permalink
Merge pull request #178 from GrimoireGL/feat/0.33.0
Browse files Browse the repository at this point in the history
fix: add mouse down event and mouse up event
  • Loading branch information
kyasbal authored Dec 2, 2017
2 parents c67db3a + b8f26ea commit 2221631
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Components/RenderStage/RenderHitareaComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,18 @@ export default class RenderHitareaComponent extends SingleBufferRenderStageBase
}
}

public $mousedown(v: ViewportMouseEvent): void {
if (this._lastRenderable instanceof Component) {
this._lastRenderable.node.emit("mousedown", this._lastRenderable);
}
}

public $mouseup(v: ViewportMouseEvent): void {
if (this._lastRenderable instanceof Component) {
this._lastRenderable.node.emit("mouseup", this._lastRenderable);
}
}

/**
* Update current mesh index. Emit events if need.
* @param index
Expand Down

0 comments on commit 2221631

Please sign in to comment.