getSpinByCurrentPosition fixed in js