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

!432 UI tensor bugfix

Merge pull request !432 from 夏易凡/0710master
......@@ -114,6 +114,7 @@ export default {
updated: false, // Updated
scrollTop: false, // Wheather scroll to the top
filterCorrect: true, // Wheather the dimension input is correct
viewResizeFlag: false, // Size reset flag
// Accuray options
accuracyArr: [
{label: 0, value: 0},
......@@ -274,9 +275,10 @@ export default {
this.gridObj.setData(this.formateArr, this.scrollTop);
this.scrollTop = false;
const columnsLength = this.columnsData.length;
if (this.columnsLength !== columnsLength) {
if (this.columnsLength !== columnsLength || this.viewResizeFlag) {
this.gridObj.setColumns(this.columnsData);
this.columnsLength = columnsLength;
this.viewResizeFlag = false;
}
this.gridObj.render();
});
......@@ -367,10 +369,14 @@ export default {
*/
resizeView() {
if (this.gridObj) {
this.$nextTick(() => {
this.gridObj.resizeCanvas();
this.gridObj.render();
});
if (this.incorrectData) {
this.viewResizeFlag = true;
} else {
this.$nextTick(() => {
this.gridObj.resizeCanvas();
this.gridObj.render();
});
}
}
},
/**
......
......@@ -696,7 +696,7 @@ export default {
});
if (yIndex === null && this.viewName === 1) {
this.fullData.forEach((item, index) => {
if (index > value[1]) {
if (index >= value[1]) {
yIndex = yIndex === null ? index : Math.min(yIndex, index);
}
});
......
......@@ -952,7 +952,7 @@ export default {
});
if (yIndex === null && this.curViewName === 1) {
sampleObject.chartData.forEach((item, index) => {
if (index > value[1]) {
if (index >= value[1]) {
yIndex = yIndex === null ? index : Math.min(yIndex, index);
}
});
......
......@@ -566,7 +566,7 @@ export default {
sampleItem.curStep = '';
sampleItem.sliderValue = 0;
sampleItem.totalStepNum = 0;
this.clearMartixData();
this.clearMartixData(sampleItem);
return;
}
const oldTotalStepNum = sampleItem.totalStepNum;
......@@ -966,9 +966,6 @@ export default {
clearTimeout(sampleItem.sliderChangeTimer);
sampleItem.sliderChangeTimer = null;
}
if (sampleItem.curMartixShowSliderValue === sliderValue) {
return;
}
if (!sampleItem.fullData || !sampleItem.fullData[sliderValue]) {
return;
}
......@@ -980,6 +977,9 @@ export default {
);
sampleItem.curDataType = sampleItem.formateData.value.data_type;
sampleItem.curDims = JSON.stringify(sampleItem.formateData.value.dims);
if (sampleItem.curMartixShowSliderValue === sliderValue) {
return;
}
sampleItem.sliderChangeTimer = setTimeout(() => {
this.freshtMartixData(sampleItem);
}, 500);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册