Simplify code a bit, by chainging variable declarations.

This commit is contained in:
Jürg Lehni 2011-03-02 16:08:11 +00:00
parent 5d680b1987
commit ab9d07501e

View file

@ -157,16 +157,16 @@ Raster = Item.extend({
// Now rotate the corner points of the image rectangle do find the // Now rotate the corner points of the image rectangle do find the
// extremas that define our raster's bounds, and update them straight // extremas that define our raster's bounds, and update them straight
// away // away
var width = this._size.width; var width = this._size.width,
var height = this._size.height; height = this._size.height,
var x = -width / 2; x = -width / 2,
var y = -height / 2; y = -height / 2,
var coords = [ coords = [
x, y, x, y,
x + width, y, x + width, y,
x + width, y + height, x + width, y + height,
x, y + height x, y + height
]; ];
this.matrix.transform(coords, 0, coords, 0, 4); this.matrix.transform(coords, 0, coords, 0, 4);
// Loop through all x and y coordinates and update min and max values. // Loop through all x and y coordinates and update min and max values.
// Start with the first coordinate pair for both (coords.slice(0, 2)). // Start with the first coordinate pair for both (coords.slice(0, 2)).