mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-06-08 03:24:56 -04:00
Change getSkinSize to getCurrentSkinSize for renderer update.
This commit is contained in:
parent
d177f4cd0c
commit
f29482957c
3 changed files with 3 additions and 3 deletions
|
@ -118,7 +118,7 @@ class Scratch3LooksBlocks {
|
|||
*/
|
||||
_positionBubble (target) {
|
||||
const bubbleState = this._getBubbleState(target);
|
||||
const [bubbleWidth, bubbleHeight] = this.runtime.renderer.getSkinSize(bubbleState.drawableId);
|
||||
const [bubbleWidth, bubbleHeight] = this.runtime.renderer.getCurrentSkinSize(bubbleState.drawableId);
|
||||
const targetBounds = target.getBoundsForBubble();
|
||||
const stageBounds = this.runtime.getTargetForStage().getBounds();
|
||||
if (bubbleState.onSpriteRight && bubbleWidth + targetBounds.right > stageBounds.right &&
|
||||
|
|
|
@ -355,7 +355,7 @@ class RenderedTarget extends Target {
|
|||
if (this.renderer) {
|
||||
// Clamp to scales relative to costume and stage size.
|
||||
// See original ScratchSprite.as:setSize.
|
||||
const costumeSize = this.renderer.getSkinSize(this.drawableID);
|
||||
const costumeSize = this.renderer.getCurrentSkinSize(this.drawableID);
|
||||
const origW = costumeSize[0];
|
||||
const origH = costumeSize[1];
|
||||
const minScale = Math.min(1, Math.max(5 / origW, 5 / origH));
|
||||
|
|
2
test/fixtures/fake-renderer.js
vendored
2
test/fixtures/fake-renderer.js
vendored
|
@ -22,7 +22,7 @@ FakeRenderer.prototype.updateDrawableProperties = function (d, p) { // eslint-di
|
|||
return true;
|
||||
};
|
||||
|
||||
FakeRenderer.prototype.getSkinSize = function (d) { // eslint-disable-line no-unused-vars
|
||||
FakeRenderer.prototype.getCurrentSkinSize = function (d) { // eslint-disable-line no-unused-vars
|
||||
return [0, 0];
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue