add smartScale to js version
resolve conflict