Skip to content

Commit e0b6355

Browse files
psychedelicioushipsterusername
authored andcommitted
docs(ui): getColorAtCoordinate
1 parent aa54c1f commit e0b6355

File tree

1 file changed

+4
-3
lines changed
  • invokeai/frontend/web/src/features/controlLayers/konva

1 file changed

+4
-3
lines changed

invokeai/frontend/web/src/features/controlLayers/konva/util.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -636,9 +636,10 @@ export const getPointerType = (e: KonvaEventObject<PointerEvent>): 'mouse' | 'pe
636636
};
637637

638638
/**
639-
* Gets the color under the cursor on a Konva stage.
640-
* @param stage The konva stage
641-
* @returns The color under the cursor, or null if the cursor is not over the stage
639+
* Gets the color at the given coordinate on the stage.
640+
* @param stage The konva stage.
641+
* @param coord The coordinate to get the color at. This must be the _absolute_ coordinate on the stage.
642+
* @returns The color under the coordinate, or null if there was a problem getting the color.
642643
*/
643644
export const getColorAtCoordinate = (stage: Konva.Stage, coord: Coordinate): RgbColor | null => {
644645
const ctx = stage

0 commit comments

Comments
 (0)