提交 669c3951 编写于 作者: X xiayifan

UI tensor bugfix

1.fix an issue where the table would be displayed incorrectly when an
  error message was displayed in full screen
2.the mouse position in histogram mode is optimized
3.fix an issue where the step was displayed incorrectly when slider move
  fast
上级 94d15a0b
...@@ -114,6 +114,7 @@ export default { ...@@ -114,6 +114,7 @@ export default {
updated: false, // Updated updated: false, // Updated
scrollTop: false, // Wheather scroll to the top scrollTop: false, // Wheather scroll to the top
filterCorrect: true, // Wheather the dimension input is correct filterCorrect: true, // Wheather the dimension input is correct
viewResizeFlag: false, // Size reset flag
// Accuray options // Accuray options
accuracyArr: [ accuracyArr: [
{label: 0, value: 0}, {label: 0, value: 0},
...@@ -274,9 +275,10 @@ export default { ...@@ -274,9 +275,10 @@ export default {
this.gridObj.setData(this.formateArr, this.scrollTop); this.gridObj.setData(this.formateArr, this.scrollTop);
this.scrollTop = false; this.scrollTop = false;
const columnsLength = this.columnsData.length; const columnsLength = this.columnsData.length;
if (this.columnsLength !== columnsLength) { if (this.columnsLength !== columnsLength || this.viewResizeFlag) {
this.gridObj.setColumns(this.columnsData); this.gridObj.setColumns(this.columnsData);
this.columnsLength = columnsLength; this.columnsLength = columnsLength;
this.viewResizeFlag = false;
} }
this.gridObj.render(); this.gridObj.render();
}); });
...@@ -367,10 +369,14 @@ export default { ...@@ -367,10 +369,14 @@ export default {
*/ */
resizeView() { resizeView() {
if (this.gridObj) { if (this.gridObj) {
this.$nextTick(() => { if (this.incorrectData) {
this.gridObj.resizeCanvas(); this.viewResizeFlag = true;
this.gridObj.render(); } else {
}); this.$nextTick(() => {
this.gridObj.resizeCanvas();
this.gridObj.render();
});
}
} }
}, },
/** /**
......
...@@ -696,7 +696,7 @@ export default { ...@@ -696,7 +696,7 @@ export default {
}); });
if (yIndex === null && this.viewName === 1) { if (yIndex === null && this.viewName === 1) {
this.fullData.forEach((item, index) => { this.fullData.forEach((item, index) => {
if (index > value[1]) { if (index >= value[1]) {
yIndex = yIndex === null ? index : Math.min(yIndex, index); yIndex = yIndex === null ? index : Math.min(yIndex, index);
} }
}); });
......
...@@ -952,7 +952,7 @@ export default { ...@@ -952,7 +952,7 @@ export default {
}); });
if (yIndex === null && this.curViewName === 1) { if (yIndex === null && this.curViewName === 1) {
sampleObject.chartData.forEach((item, index) => { sampleObject.chartData.forEach((item, index) => {
if (index > value[1]) { if (index >= value[1]) {
yIndex = yIndex === null ? index : Math.min(yIndex, index); yIndex = yIndex === null ? index : Math.min(yIndex, index);
} }
}); });
......
...@@ -566,7 +566,7 @@ export default { ...@@ -566,7 +566,7 @@ export default {
sampleItem.curStep = ''; sampleItem.curStep = '';
sampleItem.sliderValue = 0; sampleItem.sliderValue = 0;
sampleItem.totalStepNum = 0; sampleItem.totalStepNum = 0;
this.clearMartixData(); this.clearMartixData(sampleItem);
return; return;
} }
const oldTotalStepNum = sampleItem.totalStepNum; const oldTotalStepNum = sampleItem.totalStepNum;
...@@ -966,9 +966,6 @@ export default { ...@@ -966,9 +966,6 @@ export default {
clearTimeout(sampleItem.sliderChangeTimer); clearTimeout(sampleItem.sliderChangeTimer);
sampleItem.sliderChangeTimer = null; sampleItem.sliderChangeTimer = null;
} }
if (sampleItem.curMartixShowSliderValue === sliderValue) {
return;
}
if (!sampleItem.fullData || !sampleItem.fullData[sliderValue]) { if (!sampleItem.fullData || !sampleItem.fullData[sliderValue]) {
return; return;
} }
...@@ -980,6 +977,9 @@ export default { ...@@ -980,6 +977,9 @@ export default {
); );
sampleItem.curDataType = sampleItem.formateData.value.data_type; sampleItem.curDataType = sampleItem.formateData.value.data_type;
sampleItem.curDims = JSON.stringify(sampleItem.formateData.value.dims); sampleItem.curDims = JSON.stringify(sampleItem.formateData.value.dims);
if (sampleItem.curMartixShowSliderValue === sliderValue) {
return;
}
sampleItem.sliderChangeTimer = setTimeout(() => { sampleItem.sliderChangeTimer = setTimeout(() => {
this.freshtMartixData(sampleItem); this.freshtMartixData(sampleItem);
}, 500); }, 500);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册