@leafer-game/worker 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.
package/dist/worker.js CHANGED
@@ -2872,7 +2872,7 @@ var LeaferUI = function(exports) {
2872
2872
  return needConvert ? PathConvert.toCanvasData(data, curveMode) : data;
2873
2873
  },
2874
2874
  toCanvasData(old, curveMode) {
2875
- let x = 0, y = 0, x1 = 0, y1 = 0, i = 0, len = old.length, controlX, controlY, command, lastCommand, smooth;
2875
+ let x = 0, y = 0, x1 = 0, y1 = 0, startX = 0, startY = 0, i = 0, len = old.length, controlX, controlY, command, lastCommand, smooth;
2876
2876
  const data = [];
2877
2877
  while (i < len) {
2878
2878
  command = old[i];
@@ -2884,7 +2884,8 @@ var LeaferUI = function(exports) {
2884
2884
  case M$5:
2885
2885
  x = old[i + 1];
2886
2886
  y = old[i + 2];
2887
- data.push(lastCommand === command ? L$6 : M$5, x, y);
2887
+ if (lastCommand === command) data.push(L$6, x, y); else data.push(M$5, x, y), startX = x,
2888
+ startY = y;
2888
2889
  i += 3;
2889
2890
  break;
2890
2891
 
@@ -2999,6 +3000,8 @@ var LeaferUI = function(exports) {
2999
3000
  case z:
3000
3001
  case Z$5:
3001
3002
  data.push(Z$5);
3003
+ x = startX;
3004
+ y = startY;
3002
3005
  i++;
3003
3006
  break;
3004
3007
 
@@ -6665,7 +6668,7 @@ var LeaferUI = function(exports) {
6665
6668
  this.levelMap = null;
6666
6669
  }
6667
6670
  }
6668
- const version = "2.1.1";
6671
+ const version = "2.1.2";
6669
6672
  class LeaferCanvas extends LeaferCanvasBase {
6670
6673
  get allowBackgroundColor() {
6671
6674
  return true;
@@ -9059,7 +9062,6 @@ var LeaferUI = function(exports) {
9059
9062
  const {fontSize: fontSize, italic: italic, padding: padding, __autoWidth: autoWidth, __autoHeight: autoHeight} = data;
9060
9063
  this.__updateTextDrawData();
9061
9064
  const {bounds: contentBounds} = data.__textDrawData;
9062
- console.log(contentBounds);
9063
9065
  const b = layout.boxBounds;
9064
9066
  layout.contentBounds = contentBounds;
9065
9067
  if (data.__lineHeight < fontSize) layout.renderChanged = true;