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

Function incrementX

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

Source from the content-addressed store, hash-verified

206 return {x, y};
207 },
208 incrementX(stepSize = 1) {
209 setXValue(
210 xValue + stepSize > maxValueX
211 ? maxValueX
212 : snapValueToStep(xValue + stepSize, minValueX, maxValueX, stepX)
213 );
214 },
215 incrementY(stepSize = 1) {
216 setYValue(
217 yValue + stepSize > maxValueY

Callers 1

onMoveFunction · 0.85

Calls 2

snapValueToStepFunction · 0.90
setXValueFunction · 0.85

Tested by

no test coverage detected