MCPcopy Create free account
hub / github.com/adobe/react-spectrum / incrementY

Function incrementY

packages/react-stately/src/color/useColorAreaState.ts:215–221  ·  view source on GitHub ↗
(stepSize = 1)

Source from the content-addressed store, hash-verified

213 );
214 },
215 incrementY(stepSize = 1) {
216 setYValue(
217 yValue + stepSize > maxValueY
218 ? maxValueY
219 : snapValueToStep(yValue + stepSize, minValueY, maxValueY, stepY)
220 );
221 },
222 decrementX(stepSize = 1) {
223 setXValue(snapValueToStep(xValue - stepSize, minValueX, maxValueX, stepX));
224 },

Callers 1

onMoveFunction · 0.85

Calls 2

snapValueToStepFunction · 0.90
setYValueFunction · 0.85

Tested by

no test coverage detected