Skip to content

Commit

Permalink
Update hand icon to use drag indicator image and adjust positioning, …
Browse files Browse the repository at this point in the history
…see: #81
  • Loading branch information
marlitas committed Feb 13, 2025
1 parent 1882de6 commit f689fc7
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions js/common/view/KittenNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import CountingObject, { AddendType } from '../model/CountingObject.js';
import { PositionPropertyType } from '../model/NumberPairsModel.js';
import NumberPairsColors from '../NumberPairsColors.js';
import NumberPairsConstants from '../NumberPairsConstants.js';
import hand_png from '../../../../scenery-phet/images/hand_png.js';
import dragIndicatorHand_png from '../../../../scenery-phet/images/dragIndicatorHand_png.js';

type SelfOptions = {
onEndDrag: ( countingObject: CountingObject, positionPropertyType: PositionPropertyType ) => void;
Expand All @@ -58,7 +58,7 @@ export default class KittenNode extends InteractiveHighlightingNode {
public constructor(
public readonly countingObject: CountingObject,
dragBounds: Bounds2,
newKittenSelectedEmitter: Emitter<[CountingObject]>,
newKittenSelectedEmitter: Emitter<[ CountingObject ]>,
hasAttributeBeenSwitchedProperty: Property<boolean>,
providedOptions: KittenNodeOptions
) {
Expand Down Expand Up @@ -118,10 +118,11 @@ export default class KittenNode extends InteractiveHighlightingNode {
stroke: null
} );

const handIcon = new Image( hand_png, {
const handIcon = new Image( dragIndicatorHand_png, {
maxWidth: 24,
centerX: focusPanel.centerX + 6,
y: 13,
left: focusPanel.centerX - 8,
top: 6,
rotation: Math.PI * 1.85,
visibleProperty: handIconVisibleProperty
} );

Expand Down

0 comments on commit f689fc7

Please sign in to comment.