Skip to content

Commit

Permalink
removing some extra console.logs and changing the FilterType to neare…
Browse files Browse the repository at this point in the history
…st neighbor in IE
  • Loading branch information
heygrady committed Oct 3, 2010
1 parent d93dde9 commit a0ebc90
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions lib/jquery.transform.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -367,9 +367,12 @@
this.$elem.css(property, 'matrix(' + a + ', ' + b + ', ' + c + ', ' + d + ', ' + tx + ', ' + ty + ')'); this.$elem.css(property, 'matrix(' + a + ', ' + b + ', ' + c + ', ' + d + ', ' + tx + ', ' + ty + ')');
} else if (jQuery.browser.msie) { // IE } else if (jQuery.browser.msie) { // IE
// IE requires the special transform Filter // IE requires the special transform Filter
var filterType = ', filterType=\'nearest neighbor\''; //bilinear
var style = this.$elem[0].style; var style = this.$elem[0].style;
var matrixFilter = 'progid:DXImageTransform.Microsoft.Matrix(M11=' + a + ', M12=' + c + ', M21=' + b + ', M22=' + d + ', sizingMethod=\'auto expand\')'; var matrixFilter = 'progid:DXImageTransform.Microsoft.Matrix(' +
var filter = style.filter || jQuery.curCSS( this.$elem[0], "filter" ) || ""; 'M11=' + a + ', M12=' + c + ', M21=' + b + ', M22=' + d +
', sizingMethod=\'auto expand\'' + filterType + ')';
var filter = style.filter || jQuery.curCSS( this.$elem[0], "filter" ) || "";var filter = style.filter || jQuery.curCSS( this.$elem[0], "filter" ) || "";
style.filter = rmatrix.test(filter) ? filter.replace(rmatrix, matrixFilter) : filter ? filter + ' ' + matrixFilter : matrixFilter; style.filter = rmatrix.test(filter) ? filter.replace(rmatrix, matrixFilter) : filter ? filter + ' ' + matrixFilter : matrixFilter;


// Let's know that we're applying post matrix fixes and the height/width will be static for a bit // Let's know that we're applying post matrix fixes and the height/width will be static for a bit
Expand Down Expand Up @@ -431,7 +434,6 @@
} else { } else {
this.setAttr('origin', [x, y]); this.setAttr('origin', [x, y]);
} }
console.log(x, y);
return true; return true;
}, },


Expand Down Expand Up @@ -500,7 +502,6 @@
// now we need to fix it! // now we need to fix it!
var calc = new $.matrix.calc(matrix, this.safeOuterHeight(), this.safeOuterWidth()), var calc = new $.matrix.calc(matrix, this.safeOuterHeight(), this.safeOuterWidth()),
origin = this.getAttr('origin'); origin = this.getAttr('origin');
console.log(origin);


// translate a 0, 0 origin to the current origin // translate a 0, 0 origin to the current origin
var offset = calc.originOffset({ var offset = calc.originOffset({
Expand Down Expand Up @@ -749,11 +750,11 @@
var transform = this.attr || this.$elem.attr(attr); var transform = this.attr || this.$elem.attr(attr);
if (!transform) { if (!transform) {
// We don't have any existing values, save it // We don't have any existing values, save it
this.attr = value; this.attr = func + '(' + value + ')';
this.$elem.attr(attr, this.attr); this.$elem.attr(attr, this.attr);
} else if (transform.indexOf(func) > -1) { } else if (transform.indexOf(func) > -1) {
// we don't have this function yet, save it // we don't have this function yet, save it
this.attr = transform + ' ' + value; this.attr = transform + ' ' + func + '(' + value + ')';
this.$elem.attr(attr, this.attr); this.$elem.attr(attr, this.attr);
} }


Expand All @@ -771,7 +772,7 @@
parts = rfuncvalue.exec(values[i]); parts = rfuncvalue.exec(values[i]);


if (func == parts[1]) { if (func == parts[1]) {
values[i] = value; values[i] = func + '(' + value + ')';
break; break;
} }
} }
Expand Down Expand Up @@ -823,7 +824,6 @@
} }


var transform = this.attr || this.$elem.attr(attr); var transform = this.attr || this.$elem.attr(attr);
console.log(transform);
var rscalefunc = $.transform.rfunc.scale; var rscalefunc = $.transform.rfunc.scale;
if (func != 'origin' && func != 'matrix' && (!transform || transform.indexOf(func) === -1)) { if (func != 'origin' && func != 'matrix' && (!transform || transform.indexOf(func) === -1)) {
// We don't have any existing values, return null // We don't have any existing values, return null
Expand Down

0 comments on commit a0ebc90

Please sign in to comment.