Calc: Clicked column & row headers are corretly shown.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com> Change-Id: I79fa7a4696cc88c6165a454142770ce6650985fe
This commit is contained in:
parent
096417e6ec
commit
98d97a2bcc
2 changed files with 5 additions and 7 deletions
|
@ -39,8 +39,6 @@ L.Control.ColumnHeader = L.Control.Header.extend({
|
|||
this._setCanvasHeight();
|
||||
this._canvasBaseHeight = this._canvasHeight;
|
||||
|
||||
this._canvasContext.scale(this._dpiScale, this._dpiScale);
|
||||
|
||||
this._headerHeight = this._canvasHeight;
|
||||
L.Control.Header.colHeaderHeight = this._canvasHeight;
|
||||
|
||||
|
|
|
@ -287,7 +287,7 @@ L.Control.Header = L.Control.extend({
|
|||
if (!this._headerInfo)
|
||||
return false;
|
||||
|
||||
var position = this._getParallelPos(point);
|
||||
var position = this._headerInfo._isCol ? point.x: point.y;
|
||||
|
||||
var that = this;
|
||||
var result = null;
|
||||
|
@ -356,16 +356,16 @@ L.Control.Header = L.Control.extend({
|
|||
_mouseEventToCanvasPos: function(canvas, evt) {
|
||||
var rect = canvas.getBoundingClientRect();
|
||||
return {
|
||||
x: evt.clientX - rect.left,
|
||||
y: evt.clientY - rect.top
|
||||
x: (evt.clientX - rect.left) * window.devicePixelRatio,
|
||||
y: (evt.clientY - rect.top) * window.devicePixelRatio
|
||||
};
|
||||
},
|
||||
|
||||
_hammerEventToCanvasPos: function(canvas, event) {
|
||||
var rect = canvas.getBoundingClientRect();
|
||||
return {
|
||||
x: event.center.x - rect.left,
|
||||
y: event.center.y - rect.top
|
||||
x: (event.center.x - rect.left) * window.devicePixelRatio,
|
||||
y: (event.center.y - rect.top) * window.devicePixelRatio
|
||||
};
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in a new issue