MOD: drawing the Rect shape on layers and fix jslint errors bug