fix multi-monitor
Layer container allocation box is relative to the drawing area. So transform stage point before checking.
Fix 58677dc1.
Close #52.
This commit is contained in:
parent
baf5e7c968
commit
e99927d985
7
area.js
7
area.js
|
|
@ -390,11 +390,12 @@ var DrawingArea = new Lang.Class({
|
||||||
this.gridLayer.queue_repaint();
|
this.gridLayer.queue_repaint();
|
||||||
},
|
},
|
||||||
|
|
||||||
_transformStagePoint: function(x, y) {
|
_transformStagePoint: function(stageX, stageY) {
|
||||||
if (!this.layerContainer.get_allocation_box().contains(x, y))
|
let [s, x, y] = this.transform_stage_point(stageX, stageY);
|
||||||
|
if (!s || !this.layerContainer.get_allocation_box().contains(x, y))
|
||||||
return [false, 0, 0];
|
return [false, 0, 0];
|
||||||
|
|
||||||
return this.layerContainer.transform_stage_point(x, y);
|
return this.layerContainer.transform_stage_point(stageX, stageY);
|
||||||
},
|
},
|
||||||
|
|
||||||
_onButtonPressed: function(actor, event) {
|
_onButtonPressed: function(actor, event) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue