@wcardinal/wcardinal-ui 0.327.0 → 0.329.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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.327.0
2
+ Winter Cardinal UI v0.329.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -30414,6 +30414,7 @@ var DInputBoolean = /** @class */ (function (_super) {
30414
30414
  __extends(DInputBoolean, _super);
30415
30415
  function DInputBoolean(options) {
30416
30416
  var _this = _super.call(this, options) || this;
30417
+ _this._lockCount = 0;
30417
30418
  _this.addChild(_this.getButtonOff());
30418
30419
  _this.addChild(_this.getButtonOn());
30419
30420
  var value = options === null || options === void 0 ? void 0 : options.value;
@@ -30421,8 +30422,10 @@ var DInputBoolean = /** @class */ (function (_super) {
30421
30422
  _this.value = value;
30422
30423
  }
30423
30424
  _this.getButtonGroup().on("active", function () {
30424
- var newValue = _this.value;
30425
- _this.emit("change", newValue, !newValue, _this);
30425
+ if (_this._lockCount <= 0) {
30426
+ var newValue = _this.value;
30427
+ _this.emit("change", newValue, !newValue, _this);
30428
+ }
30426
30429
  });
30427
30430
  return _this;
30428
30431
  }
@@ -30472,12 +30475,19 @@ var DInputBoolean = /** @class */ (function (_super) {
30472
30475
  },
30473
30476
  set: function (value) {
30474
30477
  if (this.value !== value) {
30475
- if (value) {
30476
- this.getButtonOn().activate();
30478
+ this._lockCount += 1;
30479
+ try {
30480
+ if (value) {
30481
+ this.getButtonOn().activate();
30482
+ }
30483
+ else {
30484
+ this.getButtonOff().activate();
30485
+ }
30477
30486
  }
30478
- else {
30479
- this.getButtonOff().activate();
30487
+ catch (e) {
30488
+ // DO NOTHING
30480
30489
  }
30490
+ this._lockCount -= 1;
30481
30491
  }
30482
30492
  },
30483
30493
  enumerable: false,
@@ -50581,7 +50591,8 @@ var DThemeWhiteDiagramCanvasEditor = /** @class */ (function (_super) {
50581
50591
  return 0.5;
50582
50592
  };
50583
50593
  DThemeWhiteDiagramCanvasEditor.prototype.getSnapGridMajorWidth = function () {
50584
- return 1.25;
50594
+ var _a;
50595
+ return Math.max(1, 2 / ((_a = window.devicePixelRatio) !== null && _a !== void 0 ? _a : 1));
50585
50596
  };
50586
50597
  DThemeWhiteDiagramCanvasEditor.prototype.getSnapGridMajorStyle = function () {
50587
50598
  return EShapeStrokeStyle.DASHED | EShapeStrokeStyle.NON_SCALING;
@@ -59836,7 +59847,8 @@ var DThemeDarkDiagramCanvasEditor = /** @class */ (function (_super) {
59836
59847
  return 0.5;
59837
59848
  };
59838
59849
  DThemeDarkDiagramCanvasEditor.prototype.getSnapGridMajorWidth = function () {
59839
- return 1.25;
59850
+ var _a;
59851
+ return Math.max(1, 2 / ((_a = window.devicePixelRatio) !== null && _a !== void 0 ? _a : 1));
59840
59852
  };
59841
59853
  DThemeDarkDiagramCanvasEditor.prototype.getSnapGridMajorStyle = function () {
59842
59854
  return EShapeStrokeStyle.DASHED | EShapeStrokeStyle.NON_SCALING;
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.327.0
2
+ Winter Cardinal UI v0.329.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -30411,6 +30411,7 @@
30411
30411
  __extends(DInputBoolean, _super);
30412
30412
  function DInputBoolean(options) {
30413
30413
  var _this = _super.call(this, options) || this;
30414
+ _this._lockCount = 0;
30414
30415
  _this.addChild(_this.getButtonOff());
30415
30416
  _this.addChild(_this.getButtonOn());
30416
30417
  var value = options === null || options === void 0 ? void 0 : options.value;
@@ -30418,8 +30419,10 @@
30418
30419
  _this.value = value;
30419
30420
  }
30420
30421
  _this.getButtonGroup().on("active", function () {
30421
- var newValue = _this.value;
30422
- _this.emit("change", newValue, !newValue, _this);
30422
+ if (_this._lockCount <= 0) {
30423
+ var newValue = _this.value;
30424
+ _this.emit("change", newValue, !newValue, _this);
30425
+ }
30423
30426
  });
30424
30427
  return _this;
30425
30428
  }
@@ -30469,12 +30472,19 @@
30469
30472
  },
30470
30473
  set: function (value) {
30471
30474
  if (this.value !== value) {
30472
- if (value) {
30473
- this.getButtonOn().activate();
30475
+ this._lockCount += 1;
30476
+ try {
30477
+ if (value) {
30478
+ this.getButtonOn().activate();
30479
+ }
30480
+ else {
30481
+ this.getButtonOff().activate();
30482
+ }
30474
30483
  }
30475
- else {
30476
- this.getButtonOff().activate();
30484
+ catch (e) {
30485
+ // DO NOTHING
30477
30486
  }
30487
+ this._lockCount -= 1;
30478
30488
  }
30479
30489
  },
30480
30490
  enumerable: false,