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

Function setDragging

packages/react-stately/src/color/useColorAreaState.ts:228–237  ·  view source on GitHub ↗
(isDragging)

Source from the content-addressed store, hash-verified

226 setYValue(snapValueToStep(yValue - stepSize, minValueY, maxValueY, stepY));
227 },
228 setDragging(isDragging) {
229 let wasDragging = isDraggingRef.current;
230 isDraggingRef.current = isDragging;
231
232 if (onChangeEnd && !isDragging && wasDragging) {
233 onChangeEnd(valueRef.current);
234 }
235
236 setDragging(isDragging);
237 },
238 isDragging,
239 getDisplayColor() {
240 return color.withChannelValue('alpha', 1);

Callers 2

startDragFunction · 0.50
endDragFunction · 0.50

Calls 1

onChangeEndFunction · 0.70

Tested by

no test coverage detected