mirror of
https://github.com/xibyte/jsketcher
synced 2026-02-16 04:16:22 +01:00
fix mouse events
This commit is contained in:
parent
8721a50227
commit
dca5a1be85
1 changed files with 6 additions and 2 deletions
|
|
@ -251,9 +251,13 @@ TCAD.TWO.Viewer.prototype.screenToModel2 = function(x, y, out) {
|
|||
out.y /= this.scale;
|
||||
};
|
||||
|
||||
TCAD.TWO.Viewer.prototype.screenToModel = function(point) {
|
||||
TCAD.TWO.Viewer.prototype.screenToModel = function(e) {
|
||||
return this._screenToModel(e.offsetX, e.offsetY);
|
||||
};
|
||||
|
||||
TCAD.TWO.Viewer.prototype._screenToModel = function(x, y) {
|
||||
var out = {x: 0, y: 0};
|
||||
this.screenToModel2(point.x, point.y, out);
|
||||
this.screenToModel2(x, y, out);
|
||||
return out;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue