@leafer/miniapp 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3070,7 +3070,7 @@ const PathConvert = {
3070
3070
  return needConvert ? PathConvert.toCanvasData(data, curveMode) : data;
3071
3071
  },
3072
3072
  toCanvasData(old, curveMode) {
3073
- let x = 0, y = 0, x1 = 0, y1 = 0, i = 0, len = old.length, controlX, controlY, command, lastCommand, smooth;
3073
+ let x = 0, y = 0, x1 = 0, y1 = 0, startX = 0, startY = 0, i = 0, len = old.length, controlX, controlY, command, lastCommand, smooth;
3074
3074
  const data = [];
3075
3075
  while (i < len) {
3076
3076
  command = old[i];
@@ -3082,7 +3082,8 @@ const PathConvert = {
3082
3082
  case M$a:
3083
3083
  x = old[i + 1];
3084
3084
  y = old[i + 2];
3085
- data.push(lastCommand === command ? L$a : M$a, x, y);
3085
+ if (lastCommand === command) data.push(L$a, x, y); else data.push(M$a, x, y), startX = x,
3086
+ startY = y;
3086
3087
  i += 3;
3087
3088
  break;
3088
3089
 
@@ -3197,6 +3198,8 @@ const PathConvert = {
3197
3198
  case z:
3198
3199
  case Z$8:
3199
3200
  data.push(Z$8);
3201
+ x = startX;
3202
+ y = startY;
3200
3203
  i++;
3201
3204
  break;
3202
3205
 
@@ -7081,7 +7084,7 @@ class LeafLevelList {
7081
7084
  }
7082
7085
  }
7083
7086
 
7084
- const version = "2.1.1";
7087
+ const version = "2.1.2";
7085
7088
 
7086
7089
  class LeaferCanvas extends LeaferCanvasBase {
7087
7090
  get allowBackgroundColor() {
@@ -9877,7 +9880,6 @@ let Text = class Text extends UI {
9877
9880
  const {fontSize: fontSize, italic: italic, padding: padding, __autoWidth: autoWidth, __autoHeight: autoHeight} = data;
9878
9881
  this.__updateTextDrawData();
9879
9882
  const {bounds: contentBounds} = data.__textDrawData;
9880
- console.log(contentBounds);
9881
9883
  const b = layout.boxBounds;
9882
9884
  layout.contentBounds = contentBounds;
9883
9885
  if (data.__lineHeight < fontSize) layout.renderChanged = true;