@meta2d/core 1.0.7 → 1.0.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meta2d/core",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "@meta2d/core: Powerful, Beautiful, Simple, Open - Web-Based 2D At Its Best .",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -4328,6 +4328,9 @@ var Canvas = /** @class */ (function () {
4328
4328
  });
4329
4329
  this.store.hover = undefined;
4330
4330
  }
4331
+ if (!this.mouseDown) {
4332
+ return;
4333
+ }
4331
4334
  var x = e.x - this.mouseDown.x;
4332
4335
  var y = e.y - this.mouseDown.y;
4333
4336
  e.shiftKey && !e.ctrlKey && (y = 0);
@@ -5075,7 +5078,14 @@ var Canvas = /** @class */ (function () {
5075
5078
  continue;
5076
5079
  }
5077
5080
  if (typeof pen[k] !== 'object' || k === 'lineDash') {
5078
- pen[k] = pen.calculative[k];
5081
+ if (k === 'lineWidth') {
5082
+ pen[k] =
5083
+ pen.calculative[k] /
5084
+ pen.calculative.canvas.store.data.scale;
5085
+ }
5086
+ else {
5087
+ pen[k] = pen.calculative[k];
5088
+ }
5079
5089
  }
5080
5090
  }
5081
5091
  calcPenRect(pen);
@@ -5083,7 +5093,13 @@ var Canvas = /** @class */ (function () {
5083
5093
  else {
5084
5094
  for (var k in pen) {
5085
5095
  if (typeof pen[k] !== 'object' || k === 'lineDash') {
5086
- pen.calculative[k] = pen[k];
5096
+ if (k === 'lineWidth') {
5097
+ pen.calculative[k] =
5098
+ pen[k] * pen.calculative.canvas.store.data.scale;
5099
+ }
5100
+ else {
5101
+ pen.calculative[k] = pen[k];
5102
+ }
5087
5103
  }
5088
5104
  }
5089
5105
  }
@@ -5779,6 +5795,20 @@ var Canvas = /** @class */ (function () {
5779
5795
  pen.calculative.strokeImage = undefined;
5780
5796
  this.loadImage(pen);
5781
5797
  }
5798
+ if (data.lineGradientColors) {
5799
+ pen.calculative.lineGradient = undefined;
5800
+ pen.calculative.gradientColorStop = undefined;
5801
+ }
5802
+ if (data.gradientColors) {
5803
+ pen.calculative.gradient = undefined;
5804
+ pen.calculative.radialGradient = undefined;
5805
+ }
5806
+ if (data.animateLineWidth) {
5807
+ pen.calculative.gradientAnimatePath = undefined;
5808
+ }
5809
+ if (data.gradientSmooth) {
5810
+ pen.calculative.gradientAnimatePath = undefined;
5811
+ }
5782
5812
  if (containIsBottom) {
5783
5813
  this.canvasImage.init();
5784
5814
  this.canvasImageBottom.init();