@flexem/fc-gui 3.0.0-alpha.104 → 3.0.0-alpha.105
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/CHANGELOG.md +6 -1
- package/assets/img/black_first_page.png +0 -0
- package/assets/img/black_last_page.png +0 -0
- package/assets/img/black_next_page.png +0 -0
- package/assets/img/black_previous_page.png +0 -0
- package/bundles/@flexem/fc-gui.umd.js +25 -26
- package/bundles/@flexem/fc-gui.umd.js.map +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js +1 -1
- package/bundles/@flexem/fc-gui.umd.min.js.map +1 -1
- package/elements/bar-graph-element.d.ts +0 -1
- package/elements/bar-graph-element.js +14 -16
- package/elements/bar-graph-element.metadata.json +1 -1
- package/elements/historical-curve/historical-curve.element.js +11 -10
- package/model/historical-curve/historical-curve-axis-settings.d.ts +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -464,4 +464,9 @@
|
|
|
464
464
|
## 3.0.0-alpha.104(2024-03-13)
|
|
465
465
|
### Web端
|
|
466
466
|
#### Features
|
|
467
|
-
1. FLEXCLOUD-2619 环形图配置常数后再配置变量导致刻度值间隔较大
|
|
467
|
+
1. FLEXCLOUD-2619 环形图配置常数后再配置变量导致刻度值间隔较大
|
|
468
|
+
|
|
469
|
+
## 3.0.0-alpha.105(2024-03-15)
|
|
470
|
+
### Web端
|
|
471
|
+
#### Features
|
|
472
|
+
1. FLEXCLOUD-3086 历史曲线可以设置筛选的背景颜色
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -35360,7 +35360,6 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
|
|
|
35360
35360
|
this.valueObj = {};
|
|
35361
35361
|
this.isNeedUpdateScale = false;
|
|
35362
35362
|
this.needAddNumber = 0;
|
|
35363
|
-
this.needInitTransform = true;
|
|
35364
35363
|
if ((this.model.minValueType === variable_value_type["a" /* VariableValueType */].Constant && this.model.maxValueType === variable_value_type["a" /* VariableValueType */].Variable)
|
|
35365
35364
|
|| this.model.maxValueType === variable_value_type["a" /* VariableValueType */].Constant && this.model.minValueType === variable_value_type["a" /* VariableValueType */].Variable) {
|
|
35366
35365
|
this.isNeedUpdateScale = true;
|
|
@@ -35376,9 +35375,7 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
|
|
|
35376
35375
|
this.$barRect.attr('transform', this.defaultTransform);
|
|
35377
35376
|
}
|
|
35378
35377
|
setTimeout(() => {
|
|
35379
|
-
|
|
35380
|
-
this.initFrameNode();
|
|
35381
|
-
}
|
|
35378
|
+
this.initFrameNode();
|
|
35382
35379
|
});
|
|
35383
35380
|
}
|
|
35384
35381
|
get readVariableName() {
|
|
@@ -35400,8 +35397,10 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
|
|
|
35400
35397
|
if (this.needAddNumber <= 3)
|
|
35401
35398
|
return;
|
|
35402
35399
|
this.$element[0].childNodes.forEach((node, index) => {
|
|
35403
|
-
const matrixE = node.transform.baseVal[0].matrix.e;
|
|
35404
|
-
node.transform.baseVal[0].matrix.e = matrixE + (this.needAddNumber - 3) * 7;
|
|
35400
|
+
// const matrixE = node.transform.baseVal[0].matrix.e;
|
|
35401
|
+
// node.transform.baseVal[0].matrix.e = matrixE + (this.needAddNumber - 3) * 7;
|
|
35402
|
+
if (!node.transform.baseVal[0])
|
|
35403
|
+
return;
|
|
35405
35404
|
if (node.nodeName === 'g') {
|
|
35406
35405
|
const nodeValue = node.attributes['clip-path'].value.replace('url(#', '').replace(')', '');
|
|
35407
35406
|
const rootNode = node.parentNode.parentNode.parentElement;
|
|
@@ -35413,8 +35412,8 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
|
|
|
35413
35412
|
const values = [];
|
|
35414
35413
|
line.split(' ').forEach((item) => {
|
|
35415
35414
|
const nItem = Number(item);
|
|
35416
|
-
if (
|
|
35417
|
-
item = nItem
|
|
35415
|
+
if (nItem === -1) {
|
|
35416
|
+
item = nItem - (this.needAddNumber - 3) * 7;
|
|
35418
35417
|
}
|
|
35419
35418
|
values.push(item);
|
|
35420
35419
|
});
|
|
@@ -35430,8 +35429,7 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
|
|
|
35430
35429
|
initFrameNode() {
|
|
35431
35430
|
const arcPath = Snap(this.$element[0]);
|
|
35432
35431
|
const b = arcPath.getBBox(true);
|
|
35433
|
-
|
|
35434
|
-
this.rootElement.append('rect').attr('id', 'StateFrame').attr('width', width).attr('height', b.height).attr('fill', 'transparent');
|
|
35432
|
+
this.rootElement.append('rect').attr('id', 'StateFrame').attr('width', b.width).attr('height', b.height).attr('fill', 'transparent');
|
|
35435
35433
|
}
|
|
35436
35434
|
updateValueObj(value, variableName) {
|
|
35437
35435
|
var _a, _b, _c;
|
|
@@ -35461,13 +35459,9 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
|
|
|
35461
35459
|
min = bar_graph_element_BarGraphElement.DEFAULT_MIN_VALUE;
|
|
35462
35460
|
max = bar_graph_element_BarGraphElement.DEFAULT_MAX_VALUE;
|
|
35463
35461
|
}
|
|
35464
|
-
if (this.model.maxValueType === variable_value_type["a" /* VariableValueType */].Variable
|
|
35462
|
+
if (this.model.maxValueType === variable_value_type["a" /* VariableValueType */].Variable || this.model.minValueType === variable_value_type["a" /* VariableValueType */].Variable) {
|
|
35465
35463
|
this.needAddNumber = max.toString().length > min.toString().length ? max.toString().length : min.toString().length;
|
|
35466
|
-
|
|
35467
|
-
this.initTransform();
|
|
35468
|
-
this.initFrameNode();
|
|
35469
|
-
this.needInitTransform = false;
|
|
35470
|
-
}
|
|
35464
|
+
this.initTransform();
|
|
35471
35465
|
}
|
|
35472
35466
|
const avgSacle = ((max - min) / this.model.masterDivisionNumber).toFixed(5);
|
|
35473
35467
|
for (let i = 0; i < textElements.length; i++) {
|
|
@@ -35502,6 +35496,10 @@ class bar_graph_element_BarGraphElement extends readable_element_ReadableElement
|
|
|
35502
35496
|
}
|
|
35503
35497
|
break;
|
|
35504
35498
|
}
|
|
35499
|
+
if (this.model.minValueType !== variable_value_type["a" /* VariableValueType */].Constant && this.model.maxValueType === variable_value_type["a" /* VariableValueType */].Constant) {
|
|
35500
|
+
const maxLen = this.model.max && this.model.max.toString().length;
|
|
35501
|
+
translateX += maxLen > 2 ? (maxLen - 3) * 7 : 0;
|
|
35502
|
+
}
|
|
35505
35503
|
text.transform.baseVal[0].matrix.e = translateX;
|
|
35506
35504
|
}
|
|
35507
35505
|
}
|
|
@@ -36805,11 +36803,12 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
36805
36803
|
}
|
|
36806
36804
|
}
|
|
36807
36805
|
renderOperationArea(chartWidth, chartHeight) {
|
|
36806
|
+
const backgroundColor = this.model.displaySetting.axisSetting.filterBackgroudColor || 'inherit';
|
|
36808
36807
|
const operationArea = this.rootElement.append('g').attr('transform', `translate(0,${chartHeight + this.displayOption.operationAreaMarginTop})`)
|
|
36809
36808
|
.append('foreignObject').attr('width', chartWidth).attr('height', this.displayOption.operationAreaHeight).attr('fill', 'none')
|
|
36810
36809
|
.append('xhtml:div').style('height', (this.displayOption.operationAreaHeight - 4) + 'px').style('overflow', 'hidden').style('margin-top', '4px');
|
|
36811
36810
|
const selectElement = operationArea.append('select').style('margin-left', this.displayOption.marginLeft + 'px')
|
|
36812
|
-
.style('background-color',
|
|
36811
|
+
.style('background-color', backgroundColor)
|
|
36813
36812
|
.style('font-size', this.displayOption.operationSelectFontSize).on('change', () => {
|
|
36814
36813
|
const displayTimePeriod = this.rootElement.select('select').property('value');
|
|
36815
36814
|
this.updateTimeRange(displayTimePeriod);
|
|
@@ -36819,26 +36818,26 @@ class historical_curve_element_HistoricalCurveElement extends conditional_displa
|
|
|
36819
36818
|
const fillColor = rect.attr('fill');
|
|
36820
36819
|
const options = selectElement.selectAll('option').data(this.timePeriods).enter().append('option');
|
|
36821
36820
|
options.text(d => d.name).attr('value', d => d.key).property('selected', d => d.key === Number(this.currentTimePeriod))
|
|
36822
|
-
.style('background-color', fillColor);
|
|
36821
|
+
.style('background-color', this.model.displaySetting.axisSetting.filterBackgroudColor || fillColor);
|
|
36823
36822
|
const buttonWidth = this.displayOption.operationButtonWidth + 'px', buttonHeight = this.displayOption.operationButtonHeight + 'px';
|
|
36824
36823
|
operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
|
|
36825
|
-
.style('float', 'right').style('background-image', 'url(assets/img/
|
|
36826
|
-
.style('background-color', '
|
|
36824
|
+
.style('float', 'right').style('background-image', 'url(assets/img/black_last_page.png)')
|
|
36825
|
+
.style('background-color', backgroundColor).style('background-size', 'cover')
|
|
36827
36826
|
.on('click', () => { this.loadLastPage(); });
|
|
36828
36827
|
operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
|
|
36829
|
-
.style('float', 'right').style('background-image', 'url(assets/img/
|
|
36828
|
+
.style('float', 'right').style('background-image', 'url(assets/img/black_next_page.png)')
|
|
36830
36829
|
.style('margin', `0 ${this.displayOption.operationButtonMargin}px 0 0`)
|
|
36831
|
-
.style('background-color', '
|
|
36830
|
+
.style('background-color', backgroundColor).style('background-size', 'cover')
|
|
36832
36831
|
.on('click', () => { this.loadNextPage(); });
|
|
36833
36832
|
operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
|
|
36834
|
-
.style('float', 'right').style('background-image', 'url(assets/img/
|
|
36833
|
+
.style('float', 'right').style('background-image', 'url(assets/img/black_previous_page.png)')
|
|
36835
36834
|
.style('margin', `0 ${this.displayOption.operationButtonMargin}px 0 0`)
|
|
36836
|
-
.style('background-color', '
|
|
36835
|
+
.style('background-color', backgroundColor).style('background-size', 'cover')
|
|
36837
36836
|
.on('click', () => { this.loadPreviousPage(); });
|
|
36838
36837
|
operationArea.append('button').style('width', buttonWidth).style('height', buttonHeight).style('border', 'none')
|
|
36839
|
-
.style('float', 'right').style('background-image', 'url(assets/img/
|
|
36838
|
+
.style('float', 'right').style('background-image', 'url(assets/img/black_first_page.png)')
|
|
36840
36839
|
.style('margin', `0 ${this.displayOption.operationButtonMargin}px 0 0`)
|
|
36841
|
-
.style('background-color', '
|
|
36840
|
+
.style('background-color', backgroundColor).style('background-size', 'cover')
|
|
36842
36841
|
.on('click', () => { this.loadFirstPage(); });
|
|
36843
36842
|
}
|
|
36844
36843
|
timeFormat(datetime, specifier) {
|