paper generate detect
fix raphaeljs problem