@wcardinal/wcardinal-ui 0.301.0 → 0.303.0

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.
Files changed (28) hide show
  1. package/dist/types/wcardinal/ui/shape/e-shape-transforms.d.ts +4 -3
  2. package/dist/wcardinal/ui/shape/e-shape-transforms.js +52 -31
  3. package/dist/wcardinal/ui/shape/e-shape-transforms.js.map +1 -1
  4. package/dist/wcardinal/ui/shape/variant/e-shape-group-size-layout.js +1 -1
  5. package/dist/wcardinal/ui/shape/variant/e-shape-group-size-layout.js.map +1 -1
  6. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-gridline-x.js +1 -0
  7. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-gridline-x.js.map +1 -1
  8. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-gridline-y.js +1 -0
  9. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-gridline-y.js.map +1 -1
  10. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-marker.js +2 -0
  11. package/dist/wcardinal/ui/theme/dark/d-theme-dark-chart-selection-marker.js.map +1 -1
  12. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-gridline-x.js +1 -1
  13. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-gridline-x.js.map +1 -1
  14. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-gridline-y.js +1 -1
  15. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-gridline-y.js.map +1 -1
  16. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-marker.js +2 -0
  17. package/dist/wcardinal/ui/theme/white/d-theme-white-chart-selection-marker.js.map +1 -1
  18. package/dist/wcardinal-ui-theme-dark.js +5 -1
  19. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  20. package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
  21. package/dist/wcardinal-ui-theme-white.js +5 -3
  22. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  23. package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
  24. package/dist/wcardinal-ui.cjs.js +61 -35
  25. package/dist/wcardinal-ui.js +53 -33
  26. package/dist/wcardinal-ui.min.js +2 -2
  27. package/dist/wcardinal-ui.min.js.map +1 -1
  28. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.301.0
2
+ Winter Cardinal UI v0.303.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -16289,7 +16289,7 @@ var EShapeTransforms = /** @class */ (function () {
16289
16289
  EShapeTransforms.finalize = function (shape) {
16290
16290
  shape.allowOnTransformChange(true);
16291
16291
  };
16292
- EShapeTransforms.apply = function (shape, transform, keepSize) {
16292
+ EShapeTransforms.apply = function (shape, transform, capability) {
16293
16293
  var editor = shape.editor;
16294
16294
  if (editor != null) {
16295
16295
  var newLocalTransform = editor.localTransform;
@@ -16297,16 +16297,10 @@ var EShapeTransforms = /** @class */ (function () {
16297
16297
  .copyTo(newLocalTransform)
16298
16298
  .append(transform)
16299
16299
  .append(editor.internalTransform);
16300
- if (keepSize) {
16301
- this.applyLocal(shape, newLocalTransform);
16302
- }
16303
- else {
16304
- var size = editor.size;
16305
- this.applyLocal(shape, newLocalTransform, size.x, size.y);
16306
- }
16300
+ this.applyLocal(shape, newLocalTransform, capability, editor.size);
16307
16301
  }
16308
16302
  };
16309
- EShapeTransforms.applyLocal = function (shape, localTransform, bx, by) {
16303
+ EShapeTransforms.applyLocal = function (shape, localTransform, capability, size) {
16310
16304
  shape.disallowUploadedUpdate();
16311
16305
  // Reconstruct the position, the rotation and the size
16312
16306
  var a = localTransform.a;
@@ -16315,30 +16309,56 @@ var EShapeTransforms = /** @class */ (function () {
16315
16309
  var d = localTransform.d;
16316
16310
  var tx = localTransform.tx;
16317
16311
  var ty = localTransform.ty;
16318
- // Rotation
16312
+ // Transform
16319
16313
  var transform = shape.transform;
16320
- var rx = Math.atan2(-c, d); // rotation - skewX
16321
- var ry = Math.atan2(+b, a); // rotation + skewY
16322
- transform.rotation = (rx + ry) * 0.5; // Here, assumes `skewX` === `skewY`
16323
- // Skew
16324
- var skew = (ry - rx) * 0.5;
16325
- transform.skew.set(skew, skew);
16326
- // Position: Assumes the pivot is invariant.
16327
- // tx = position.x - (a * px + c * py)
16328
- // ty = position.y - (b * px + d * py)
16329
- //
16330
- // Thus,
16331
- // position.x = tx + (a * px + c * py)
16332
- // position.y = ty + (b * px + d * py)
16333
- var pivot = transform.pivot;
16334
- var px = pivot.x;
16335
- var py = pivot.y;
16336
- transform.position.set(tx + (a * px + c * py), ty + (b * px + d * py));
16314
+ // Capability
16315
+ var cposition = !!(capability & EShapeCapability.POSITION);
16316
+ var crotation = !!(capability & EShapeCapability.ROTATION);
16317
+ var cskew = !!(capability & EShapeCapability.SKEW);
16318
+ var cwidth = !!(capability & EShapeCapability.WIDTH);
16319
+ var cheight = !!(capability & EShapeCapability.HEIGHT);
16320
+ // Rotation and skew
16321
+ if (crotation || cskew) {
16322
+ // Rotation
16323
+ var rx = Math.atan2(-c, d); // rotation - skewX
16324
+ var ry = Math.atan2(+b, a); // rotation + skewY
16325
+ if (crotation) {
16326
+ transform.rotation = (rx + ry) * 0.5; // Here, assumes `skewX` === `skewY`
16327
+ }
16328
+ // Skew
16329
+ if (cskew) {
16330
+ var skew = (ry - rx) * 0.5;
16331
+ transform.skew.set(skew, skew);
16332
+ }
16333
+ }
16334
+ // Position
16335
+ if (cposition) {
16336
+ // Assumes the pivot is invariant.
16337
+ // tx = position.x - (a * px + c * py)
16338
+ // ty = position.y - (b * px + d * py)
16339
+ //
16340
+ // Thus,
16341
+ // position.x = tx + (a * px + c * py)
16342
+ // position.y = ty + (b * px + d * py)
16343
+ var pivot = transform.pivot;
16344
+ var px = pivot.x;
16345
+ var py = pivot.y;
16346
+ transform.position.set(tx + (a * px + c * py), ty + (b * px + d * py));
16347
+ }
16337
16348
  // Scale
16338
- if (bx != null && by != null) {
16339
- var sx = Math.sqrt(a * a + b * b);
16340
- var sy = Math.sqrt(c * c + d * d);
16341
- shape.size.set(toSizeNormalized(bx * sx), toSizeNormalized(by * sy));
16349
+ if (cwidth || cheight) {
16350
+ var w = toSizeNormalized(size.x * Math.sqrt(a * a + b * b));
16351
+ var h = toSizeNormalized(size.y * Math.sqrt(c * c + d * d));
16352
+ var s = shape.size;
16353
+ if (cwidth && cheight) {
16354
+ s.set(w, h);
16355
+ }
16356
+ else if (cwidth) {
16357
+ s.x = w;
16358
+ }
16359
+ else {
16360
+ s.y = h;
16361
+ }
16342
16362
  }
16343
16363
  //
16344
16364
  shape.allowUploadedUpdate();
@@ -16396,7 +16416,7 @@ var EShapeGroupSizeLayout = /** @class */ (function () {
16396
16416
  .scale(sx, sy)
16397
16417
  .translate(+pivotX, +pivotY);
16398
16418
  shape.disallowOnTransformChange();
16399
- EShapeTransforms.applyLocal(shape, transform, childBase.x, childBase.y);
16419
+ EShapeTransforms.applyLocal(shape, transform, EShapeCapability.ALL, childBase);
16400
16420
  shape.allowOnTransformChange(false);
16401
16421
  };
16402
16422
  EShapeGroupSizeLayout.WORK_TRANSFORM = new pixi_js.Matrix();
@@ -49374,7 +49394,7 @@ var DThemeWhiteChartSelectionGridlineX = /** @class */ (function (_super) {
49374
49394
  var result = new EShapeBar();
49375
49395
  result.points.position = EShapeBarPosition.TOP;
49376
49396
  result.stroke.style = EShapeStrokeStyle.DASHED;
49377
- result.stroke.alpha = 0.25;
49397
+ result.stroke.alpha = 0.75;
49378
49398
  return result;
49379
49399
  };
49380
49400
  return DThemeWhiteChartSelectionGridlineX;
@@ -49396,7 +49416,7 @@ var DThemeWhiteChartSelectionGridlineY = /** @class */ (function (_super) {
49396
49416
  var result = new EShapeBar();
49397
49417
  result.points.position = EShapeBarPosition.LEFT;
49398
49418
  result.stroke.style = EShapeStrokeStyle.DASHED;
49399
- result.stroke.alpha = 0.25;
49419
+ result.stroke.alpha = 0.75;
49400
49420
  return result;
49401
49421
  };
49402
49422
  return DThemeWhiteChartSelectionGridlineY;
@@ -49417,6 +49437,8 @@ var DThemeWhiteChartSelectionMarker = /** @class */ (function (_super) {
49417
49437
  DThemeWhiteChartSelectionMarker.prototype.newShape = function (state) {
49418
49438
  var result = new EShapeCircle();
49419
49439
  result.size.set(14, 14);
49440
+ result.fill.enable = false;
49441
+ result.stroke.alpha = 0.75;
49420
49442
  return result;
49421
49443
  };
49422
49444
  return DThemeWhiteChartSelectionMarker;
@@ -58536,6 +58558,7 @@ var DThemeDarkChartSelectionGridlineX = /** @class */ (function (_super) {
58536
58558
  var result = new EShapeBar();
58537
58559
  result.points.position = EShapeBarPosition.TOP;
58538
58560
  result.stroke.style = EShapeStrokeStyle.DASHED;
58561
+ result.stroke.alpha = 0.75;
58539
58562
  return result;
58540
58563
  };
58541
58564
  return DThemeDarkChartSelectionGridlineX;
@@ -58557,6 +58580,7 @@ var DThemeDarkChartSelectionGridlineY = /** @class */ (function (_super) {
58557
58580
  var result = new EShapeBar();
58558
58581
  result.points.position = EShapeBarPosition.LEFT;
58559
58582
  result.stroke.style = EShapeStrokeStyle.DASHED;
58583
+ result.stroke.alpha = 0.75;
58560
58584
  return result;
58561
58585
  };
58562
58586
  return DThemeDarkChartSelectionGridlineY;
@@ -58577,6 +58601,8 @@ var DThemeDarkChartSelectionMarker = /** @class */ (function (_super) {
58577
58601
  DThemeDarkChartSelectionMarker.prototype.newShape = function (state) {
58578
58602
  var result = new EShapeCircle();
58579
58603
  result.size.set(14, 14);
58604
+ result.fill.enable = false;
58605
+ result.stroke.alpha = 0.75;
58580
58606
  return result;
58581
58607
  };
58582
58608
  return DThemeDarkChartSelectionMarker;
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.301.0
2
+ Winter Cardinal UI v0.303.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -16286,7 +16286,7 @@
16286
16286
  EShapeTransforms.finalize = function (shape) {
16287
16287
  shape.allowOnTransformChange(true);
16288
16288
  };
16289
- EShapeTransforms.apply = function (shape, transform, keepSize) {
16289
+ EShapeTransforms.apply = function (shape, transform, capability) {
16290
16290
  var editor = shape.editor;
16291
16291
  if (editor != null) {
16292
16292
  var newLocalTransform = editor.localTransform;
@@ -16294,16 +16294,10 @@
16294
16294
  .copyTo(newLocalTransform)
16295
16295
  .append(transform)
16296
16296
  .append(editor.internalTransform);
16297
- if (keepSize) {
16298
- this.applyLocal(shape, newLocalTransform);
16299
- }
16300
- else {
16301
- var size = editor.size;
16302
- this.applyLocal(shape, newLocalTransform, size.x, size.y);
16303
- }
16297
+ this.applyLocal(shape, newLocalTransform, capability, editor.size);
16304
16298
  }
16305
16299
  };
16306
- EShapeTransforms.applyLocal = function (shape, localTransform, bx, by) {
16300
+ EShapeTransforms.applyLocal = function (shape, localTransform, capability, size) {
16307
16301
  shape.disallowUploadedUpdate();
16308
16302
  // Reconstruct the position, the rotation and the size
16309
16303
  var a = localTransform.a;
@@ -16312,30 +16306,56 @@
16312
16306
  var d = localTransform.d;
16313
16307
  var tx = localTransform.tx;
16314
16308
  var ty = localTransform.ty;
16315
- // Rotation
16309
+ // Transform
16316
16310
  var transform = shape.transform;
16317
- var rx = Math.atan2(-c, d); // rotation - skewX
16318
- var ry = Math.atan2(+b, a); // rotation + skewY
16319
- transform.rotation = (rx + ry) * 0.5; // Here, assumes `skewX` === `skewY`
16320
- // Skew
16321
- var skew = (ry - rx) * 0.5;
16322
- transform.skew.set(skew, skew);
16323
- // Position: Assumes the pivot is invariant.
16324
- // tx = position.x - (a * px + c * py)
16325
- // ty = position.y - (b * px + d * py)
16326
- //
16327
- // Thus,
16328
- // position.x = tx + (a * px + c * py)
16329
- // position.y = ty + (b * px + d * py)
16330
- var pivot = transform.pivot;
16331
- var px = pivot.x;
16332
- var py = pivot.y;
16333
- transform.position.set(tx + (a * px + c * py), ty + (b * px + d * py));
16311
+ // Capability
16312
+ var cposition = !!(capability & EShapeCapability.POSITION);
16313
+ var crotation = !!(capability & EShapeCapability.ROTATION);
16314
+ var cskew = !!(capability & EShapeCapability.SKEW);
16315
+ var cwidth = !!(capability & EShapeCapability.WIDTH);
16316
+ var cheight = !!(capability & EShapeCapability.HEIGHT);
16317
+ // Rotation and skew
16318
+ if (crotation || cskew) {
16319
+ // Rotation
16320
+ var rx = Math.atan2(-c, d); // rotation - skewX
16321
+ var ry = Math.atan2(+b, a); // rotation + skewY
16322
+ if (crotation) {
16323
+ transform.rotation = (rx + ry) * 0.5; // Here, assumes `skewX` === `skewY`
16324
+ }
16325
+ // Skew
16326
+ if (cskew) {
16327
+ var skew = (ry - rx) * 0.5;
16328
+ transform.skew.set(skew, skew);
16329
+ }
16330
+ }
16331
+ // Position
16332
+ if (cposition) {
16333
+ // Assumes the pivot is invariant.
16334
+ // tx = position.x - (a * px + c * py)
16335
+ // ty = position.y - (b * px + d * py)
16336
+ //
16337
+ // Thus,
16338
+ // position.x = tx + (a * px + c * py)
16339
+ // position.y = ty + (b * px + d * py)
16340
+ var pivot = transform.pivot;
16341
+ var px = pivot.x;
16342
+ var py = pivot.y;
16343
+ transform.position.set(tx + (a * px + c * py), ty + (b * px + d * py));
16344
+ }
16334
16345
  // Scale
16335
- if (bx != null && by != null) {
16336
- var sx = Math.sqrt(a * a + b * b);
16337
- var sy = Math.sqrt(c * c + d * d);
16338
- shape.size.set(toSizeNormalized(bx * sx), toSizeNormalized(by * sy));
16346
+ if (cwidth || cheight) {
16347
+ var w = toSizeNormalized(size.x * Math.sqrt(a * a + b * b));
16348
+ var h = toSizeNormalized(size.y * Math.sqrt(c * c + d * d));
16349
+ var s = shape.size;
16350
+ if (cwidth && cheight) {
16351
+ s.set(w, h);
16352
+ }
16353
+ else if (cwidth) {
16354
+ s.x = w;
16355
+ }
16356
+ else {
16357
+ s.y = h;
16358
+ }
16339
16359
  }
16340
16360
  //
16341
16361
  shape.allowUploadedUpdate();
@@ -16393,7 +16413,7 @@
16393
16413
  .scale(sx, sy)
16394
16414
  .translate(+pivotX, +pivotY);
16395
16415
  shape.disallowOnTransformChange();
16396
- EShapeTransforms.applyLocal(shape, transform, childBase.x, childBase.y);
16416
+ EShapeTransforms.applyLocal(shape, transform, EShapeCapability.ALL, childBase);
16397
16417
  shape.allowOnTransformChange(false);
16398
16418
  };
16399
16419
  EShapeGroupSizeLayout.WORK_TRANSFORM = new pixi_js.Matrix();