Skip to content

Commit

Permalink
Specify canvasBounds, see #255
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Jan 12, 2023
1 parent c0fd52d commit f459a3b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/common/PhotonSprites.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { ShowState } from './model/Photon.js';
import Range from '../../../dot/js/Range.js';
import LayersModel from './model/LayersModel.js';
import greenhouseEffect from '../greenhouseEffect.js';
import GreenhouseEffectObservationWindow from './view/GreenhouseEffectObservationWindow.js';

// constants
const TARGET_PHOTON_IMAGE_WIDTH = 17; // empirically determined to match the design
Expand Down Expand Up @@ -62,7 +63,8 @@ class PhotonSprites extends Sprites {
sprites: [ visiblePhotonSprite, infraredPhotonSprite ],
spriteInstances: spriteInstances,
renderer: 'webgl',
pickable: false
pickable: false,
canvasBounds: GreenhouseEffectObservationWindow.SIZE.toBounds()
} );

// Calculate the scale that will be used to render the photon images.
Expand Down

0 comments on commit f459a3b

Please sign in to comment.