Created
September 26, 2014 01:49
-
-
Save mflux/13fce63dc307cbdfb68c to your computer and use it in GitHub Desktop.
Revisions
-
mflux created this gist
Sep 26, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ function fixGroupToShapes( g ){ var bb = g.getBoundingClientRect(); var cx = bb.width * 0.5 + bb.left; var cy = bb.height * 0.5 + bb.top; g.center(); g.translation.x = cx; g.translation.y = cy; }