static double optimizeScale(double scale) { /** * when lower than 0.1, may not zoom as we expect */ return scale < 0.1 ? 0.1 : scale; }