| 173 | } |
| 174 | |
| 175 | function getTransform(options) { |
| 176 | var transforms = []; |
| 177 | var rotate = options.rotate; |
| 178 | var scaleX = options.scaleX; |
| 179 | var scaleY = options.scaleY; |
| 180 | |
| 181 | // Rotate should come first before scale to match orientation transform |
| 182 | if (isNumber(rotate) && rotate !== 0) { |
| 183 | transforms.push('rotate(' + rotate + 'deg)'); |
| 184 | } |
| 185 | |
| 186 | if (isNumber(scaleX) && scaleX !== 1) { |
| 187 | transforms.push('scaleX(' + scaleX + ')'); |
| 188 | } |
| 189 | |
| 190 | if (isNumber(scaleY) && scaleY !== 1) { |
| 191 | transforms.push('scaleY(' + scaleY + ')'); |
| 192 | } |
| 193 | |
| 194 | return transforms.length ? transforms.join(' ') : 'none'; |
| 195 | } |
| 196 | |
| 197 | function getRotatedSizes(data, isReversed) { |
| 198 | var deg = abs(data.degree) % 180; |