diff --git a/lib/css_hooks.js b/lib/css_hooks.js index 7860fcd..73b17d6 100644 --- a/lib/css_hooks.js +++ b/lib/css_hooks.js @@ -140,13 +140,73 @@ require('TransformJS/sylvester'); } else { return $M([ - [s, 0,0], - [0, s,0], + [s,0,0], + [0,s,0], [0,0,1] ]); } } }, + scaleX: { + defaultValue: 1, + matrix: function(s) { + if (supports3d) { + return $M([ + [s,0,0,0], + [0,1,0,0], + [0,0,1,0], + [0,0,0,1] + ]); + } + else { + return $M([ + [s,0,0], + [0,1,0], + [0,0,1] + ]); + } + } + }, + scaleY: { + defaultValue: 1, + matrix: function(s) { + if (supports3d) { + return $M([ + [1,0,0,0], + [0,s,0,0], + [0,0,1,0], + [0,0,0,1] + ]); + } + else { + return $M([ + [1,0,0], + [0,s,0], + [0,0,1] + ]); + } + } + }, + scaleZ: { + defaultValue: 1, + matrix: function(s) { + if (supports3d) { + return $M([ + [1,0,0,0], + [0,1,0,0], + [0,0,s,0], + [0,0,0,1] + ]); + } + else { + return $M([ + [1,0,0], + [0,1,0], + [0,0,1] + ]); + } + } + }, translateX: { defaultValue: 0, matrix: function(tx) {