Skip to content

Instantly share code, notes, and snippets.

@louisbl
Created January 6, 2012 09:15
Show Gist options
  • Save louisbl/1569825 to your computer and use it in GitHub Desktop.
Save louisbl/1569825 to your computer and use it in GitHub Desktop.
JSFL round to pixel every items in library
var curr_doc = fl.getDocumentDOM();
fl.getDocumentDOM().library.selectAll();
for(i=0 ; i<curr_doc.selection.length ; i++ ) {
curr_doc.selection[i].x = Math.round(curr_doc.selection[i].x);
curr_doc.selection[i].y = Math.round(curr_doc.selection[i].y);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment