Update gradient.class.js
Update object.class.js
Update object.class.js

Fix code style error.
Merge pull request #1665 from asturur/Fix-Gradient-part-3

Fix gradient part 3