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:
Victor Porof 2012-01-29 20:05:44 +02:00
Родитель 27704e4ab5
Коммит 644bf8031c
4 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -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);
};
}
});