Added context menu.

This commit is contained in:
Oleg Sh
2022-03-08 14:20:19 +02:00
parent 5ae3760ba8
commit 02ee85a6e7
16 changed files with 353 additions and 89 deletions

View File

@@ -466,6 +466,9 @@ Application.prototype.CanvasOnMouseMove = function(e)
Application.prototype.CanvasOnMouseDown = function(e)
{
// Skip non left button.
if(e.which !== 1) return;
var pos = this.getMousePos(this.canvas, e); /// provide this canvas and event
this.handler.MouseDown(pos);
@@ -480,6 +483,9 @@ Application.prototype.CanvasOnMouseDown = function(e)
Application.prototype.CanvasOnMouseUp = function(e)
{
// Skip non left button.
if(e.which !== 1) return;
// this.dragObject = -1;
var pos = this.getMousePos(this.canvas, e);