зеркало из https://github.com/mozilla/gecko-dev.git
Bug 722129 - Tilt visualization mesh isn't correctly positioned when scrollbars are present or when the document body is smaller than the content window; r=rcampbell
This commit is contained in:
Родитель
27704e4ab5
Коммит
644bf8031c
|
@ -552,9 +552,8 @@ TiltVisualizer.Presenter.prototype = {
|
|||
if (!this._initialMeshConfiguration) {
|
||||
this._initialMeshConfiguration = true;
|
||||
|
||||
let zoom = this.transforms.zoom;
|
||||
let width = Math.min(aData.meshWidth * zoom, renderer.width);
|
||||
let height = Math.min(aData.meshHeight * zoom, renderer.height);
|
||||
let width = renderer.width;
|
||||
let height = renderer.height;
|
||||
|
||||
// set the necessary mesh offsets
|
||||
this.transforms.offset[0] = -width * 0.5;
|
||||
|
|
|
@ -23,7 +23,7 @@ function test() {
|
|||
|
||||
presenter.onSetupMesh = function() {
|
||||
|
||||
presenter.pickNode(canvas.width / 2, canvas.height / 2, {
|
||||
presenter.pickNode(canvas.width / 2, 10, {
|
||||
onpick: function(data)
|
||||
{
|
||||
ok(data.index > 0,
|
||||
|
|
|
@ -24,8 +24,7 @@ function test() {
|
|||
Services.obs.addObserver(whenNodeRemoved, NODE_REMOVED, false);
|
||||
|
||||
presenter.onSetupMesh = function() {
|
||||
presenter.highlightNodeAt(presenter.canvas.width / 2,
|
||||
presenter.canvas.height / 2, {
|
||||
presenter.highlightNodeAt(presenter.canvas.width / 2, 10, {
|
||||
onpick: function()
|
||||
{
|
||||
ok(presenter._currentSelection > 0,
|
||||
|
|
|
@ -24,8 +24,7 @@ function test() {
|
|||
Services.obs.addObserver(whenHighlighting, HIGHLIGHTING, false);
|
||||
|
||||
presenter.onSetupMesh = function() {
|
||||
presenter.highlightNodeAt(presenter.canvas.width / 2,
|
||||
presenter.canvas.height / 2);
|
||||
presenter.highlightNodeAt(presenter.canvas.width / 2, 10);
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче