@wcardinal/wcardinal-ui 0.370.0 → 0.372.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.370.0
2
+ Winter Cardinal UI v0.372.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -57193,14 +57193,14 @@
57193
57193
  this._container = undefined;
57194
57194
  };
57195
57195
  DChartAxisBaseTickContainer.prototype.update = function () {
57196
+ var parser = this._parser;
57196
57197
  var container = this._container;
57197
57198
  var majorShapes = this._major.shapes;
57198
57199
  var minorShapes = this._minor.shapes;
57199
- if (container != null && majorShapes && minorShapes) {
57200
+ if (parser.tick.enable && container != null && majorShapes && minorShapes) {
57200
57201
  var plotArea = container.plotArea;
57201
57202
  var transform = plotArea.container.transform.localTransform;
57202
57203
  var gridlineShapes = this._major.gridline.shapes;
57203
- var parser = this._parser;
57204
57204
  var offset = parser.padding * this._index;
57205
57205
  var work = this._work;
57206
57206
  var coordinate = void 0;
@@ -72151,12 +72151,27 @@
72151
72151
  DApplications.update(this);
72152
72152
  return true;
72153
72153
  };
72154
- DTableBody.prototype.toRowIndexMapped = function (local) {
72155
- if (0 <= this.parent.position.y + local.y) {
72156
- return Math.floor(local.y / this._rowHeight);
72154
+ /**
72155
+ * Returns a mapped row index at the given local Y position or -1.
72156
+ *
72157
+ * @param localY a local Y position
72158
+ * @returns a mapped row index at the given local Y position or -1.
72159
+ */
72160
+ DTableBody.prototype.toRowIndexMapped = function (localY) {
72161
+ if (0 <= this.parent.position.y + localY) {
72162
+ var result = Math.floor(localY / this._rowHeight);
72163
+ if (0 <= result && result < this._data.mapped.size()) {
72164
+ return result;
72165
+ }
72157
72166
  }
72158
72167
  return -1;
72159
72168
  };
72169
+ /**
72170
+ * Returns a row at the given mapped row index or null if not exits.
72171
+ *
72172
+ * @param rowIndexMapped a mapped row index
72173
+ * @returns a row at the given mapped row index or null if not exists.
72174
+ */
72160
72175
  DTableBody.prototype.toRow = function (rowIndexMapped) {
72161
72176
  var index = rowIndexMapped - this._rowIndexMappedStart;
72162
72177
  var rows = this.children;
@@ -72165,14 +72180,22 @@
72165
72180
  }
72166
72181
  return null;
72167
72182
  };
72168
- DTableBody.prototype.toCell = function (row, local) {
72183
+ /**
72184
+ * Returns a cell at the given local X position or null if not exits.
72185
+ * This method assumes the given local X position is on the given row.
72186
+ *
72187
+ * @param row a row
72188
+ * @param localX a local X position
72189
+ * @returns a cell at the given local X position or null if not exits
72190
+ */
72191
+ DTableBody.prototype.toCell = function (row, localX) {
72169
72192
  var cells = row.children;
72170
72193
  var cellsLength = cells.length;
72171
72194
  var columns = this._columns;
72172
72195
  var columnsLength = columns.length;
72173
72196
  for (var i = 0, imax = Math.min(cellsLength, columnsLength); i < imax; ++i) {
72174
72197
  var cell = cells[cellsLength - i - 1];
72175
- var x = local.x - cell.position.x;
72198
+ var x = localX - cell.position.x;
72176
72199
  if (0 <= x && x <= cell.width) {
72177
72200
  return cell;
72178
72201
  }
@@ -72184,12 +72207,12 @@
72184
72207
  var local = DTableBody.WORK_ON_CLICK;
72185
72208
  local.copyFrom(e.data.global);
72186
72209
  this.toLocal(local, undefined, local, false);
72187
- var rowIndexMapped = this.toRowIndexMapped(local);
72188
- if (0 <= rowIndexMapped && rowIndexMapped < this._data.mapped.size()) {
72210
+ var rowIndexMapped = this.toRowIndexMapped(local.y);
72211
+ if (0 <= rowIndexMapped) {
72189
72212
  // Delegate to the cell at first
72190
72213
  var row = this.toRow(rowIndexMapped);
72191
72214
  if (row) {
72192
- var cell = this.toCell(row, local);
72215
+ var cell = this.toCell(row, local.x);
72193
72216
  if (cell && cell.onRowSelect && cell.onRowSelect(e, local)) {
72194
72217
  return;
72195
72218
  }