heygrady / transform

jQuery 2d transformation plugin
437 stars 87 forks source link

Superfluous line in jquery.transform.js? #25

Closed aureality closed 13 years ago

aureality commented 13 years ago

Line 112 in jquery.transform.js prevents setting the transformation scale below appr. 0.01. Decreasing the value to for example 0.0001 does not seems to have negative side effects and enable scaling down to a smaller factor, but experiences may be different when mixing in skewing in the transformation (something I haven't tried yet) If not, the line is superfluous. The line reads

        if (Math.abs(a * d - b * c) < 0.01) {

The comment above reads: // In case the matrix can't be decomposed

heygrady commented 13 years ago

https://github.com/jaukia/zoomooz/blob/c7a37b9a65a06ba730bd66391bbd6fe8e55d3a49/js/jquery.zoomooz.js#L275

That line was more or less lifted directly from the zoomooz library as part of a the issue that added the support for decomposition in the first place. You can read that discussion here: https://github.com/heygrady/transform/issues/18

Perhaps the author of zoomooz can shed some light on the exact need for the line in question.