Skip to content

Commit

Permalink
lab/text: stage width is not constant (#1435)
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin authored May 2, 2024
1 parent a6f5944 commit a3cac72
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions extensions/lab/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

const DEFAULT_COLOR = "#575e75";
const DEFAULT_FONT = "Handwriting";
const DEFAULT_WIDTH = vm.runtime.stageWidth;
const DEFAULT_ALIGN = ALIGN_CENTER;
const DEFAULT_FONT_SIZE = 24;
const DEFAULT_OUTLINE_WIDTH = 0; // 0 = no outline
Expand Down Expand Up @@ -159,7 +158,7 @@

this.text = "";
this.color = DEFAULT_COLOR;
this.textWidth = DEFAULT_WIDTH;
this.textWidth = vm.runtime.stageWidth;
this.fontFamily = DEFAULT_FONT;
this.baseFontSize = DEFAULT_FONT_SIZE;
this.align = DEFAULT_ALIGN;
Expand Down Expand Up @@ -1401,7 +1400,7 @@

resetWidth(args, util) {
const state = this._getState(util.target);
state.skin.setWidth(DEFAULT_WIDTH);
state.skin.setWidth(vm.runtime.stageWidth);
}

startAnimate(args, util) {
Expand Down

0 comments on commit a3cac72

Please sign in to comment.