提交 74e4593c 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!432 UI tensor bugfix

Merge pull request !432 from 夏易凡/0710master
...@@ -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,11 +369,15 @@ export default { ...@@ -367,11 +369,15 @@ export default {
*/ */
resizeView() { resizeView() {
if (this.gridObj) { if (this.gridObj) {
if (this.incorrectData) {
this.viewResizeFlag = true;
} else {
this.$nextTick(() => { this.$nextTick(() => {
this.gridObj.resizeCanvas(); this.gridObj.resizeCanvas();
this.gridObj.render(); this.gridObj.render();
}); });
} }
}
}, },
/** /**
* Expand/Collapse in full screen * Expand/Collapse in full screen
......
...@@ -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.
先完成此消息的编辑!
想要评论请 注册