MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / adjust

Method adjust

src/common/overlay/levelRenderer/Color.js:867–876  ·  view source on GitHub ↗

* @function LevelRenderer.Tool.Color.prototype.adjust * @description 调整值区间 * @param {Array. } value - 数组。 * @param {Array. } region - 区间。 * @returns {number} 调整后的值

(value, region)

Source from the content-addressed store, hash-verified

865 * @returns {number} 调整后的值
866 */
867 adjust(value, region) {
868 // < to <= & > to >=
869 // modify by linzhifeng 2014-05-25 because -0 == 0
870 if (value <= region[0]) {
871 value = region[0];
872 } else if (value >= region[1]) {
873 value = region[1];
874 }
875 return value;
876 }
877
878 /**
879 * @function LevelRenderer.Tool.Color.prototype.isCalculableColor

Callers 9

getStepColorsMethod · 0.95
toColorMethod · 0.95
mixMethod · 0.95
getDataMethod · 0.95
alphaMethod · 0.95
ColorUtilSpec.jsFile · 0.80
getL7ChartPieMarkerLayerFunction · 0.80
Color.jsFile · 0.80
getStepColorsMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected